Seeking help...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Seeking help...

Jayabharath R. Dondeti
Hi,

I have installed Octave on my Linux box recently and it works nice almost similar
to matlab and works nice. I have a problem printing my plots on to the printer
or in to a file(post-script). I tried matlab command print -f 'filename' ...
did not work. I searched on all the on-line documentation...no use.

I will be thankful if you can give me a solution for how to print octve plots.

Thanks a lot,

Jayabharath.
--

      ******************************************************************
      Jayabharath Reddy Dondeti   ECE Department,Illinois Inst. of Tech.
      3301 S. Dearborn St         E-mail: [hidden email]  
      Chicago, IL 60616-3793      URL: http://www.ece.iit.edu/~jdondeti/ 
      ******************************************************************

Reply | Threaded
Open this post in threaded view
|

Re: Seeking help...

Dirk Eddelbuettel-2

I am more familiar with the gnuplot commands (rather than the matlab-style
ones), so I use

        gset terminal postscript
        gset output "graphs.ps"
        gplot X {all other plotting options}

which creates the postscript file graphs.ps. I recommend that you keep a
shell open with gnuplot to explore the interactive help.

--
   PGP key fingerprint = B2 49 75 BF 44 2C B7 AA  50 CB 19 7D 80 F7 CB DC
   http://qed.econ.queensu.ca/~edd [hidden email] [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Seeking help...

Ted.Harding
In reply to this post by Jayabharath R. Dondeti
( Re Message From: Jayabharath R. Dondeti )

>
> Hi,
>
> I have installed Octave on my Linux box recently and it works nice almost similar
> to matlab and works nice. I have a problem printing my plots on to the printer
> or in to a file(post-script). I tried matlab command print -f 'filename' ...
> did not work. I searched on all the on-line documentation...no use.
>
> I will be thankful if you can give me a solution for how to print octve plots.
>
> Thanks a lot,
>
> Jayabharath.

I have made the following two simple and primitive, but adequate, utilities
(printer.m and screen.m):
=-=-=-=-=-=-=-=-=-=-=-=-=-=-= printer.m =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
function printer(fname,orient)
# printer                -- diverts graphics to printer in PostScript
#                           (landscape, Helvetica 12pt)
# printer(fname)         -- diverts graphics to file fname in PostScript (EPS)
#                           (fname = "|lpr" for direct printing)
# printer(fname,orient)  -- as for preceding but orient="L" or "P" forces
#                              orientation (default is "L").
#
# ( screen   [see screen.m]      -- restores graphics output to screen )

if nargin == 0
   fname = "|lpr" ;
   set term postscript landscape "Helvetica" 12
else
   if nargin == 1
      set term postscript landscape "Helvetica" 12
   else
      if strcmp(orient,"P")
         set term postscript portrait "Helvetica" 14
      else
         set term postscript landscape "Helvetica" 12
      endif
   endif
endif
   
eval(["set output \"" fname "\""]);
#set output "/dev/ttyS3"
endfunction
=-=-=-=-=-=-=-=-=-=-=-=-=-=-= screen.m -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
set terminal x11
set output

Reply | Threaded
Open this post in threaded view
|

Re: Seeking help...

John Utz-3
In reply to this post by Jayabharath R. Dondeti
Hi;

printing is one of the few parts of octave that are not very matlba like.

currently, if u need to print, then u need to reset the gnuplot terminal
from X11 to postscript

octave:1> gshow terminal
octave:2>
        terminal type is x11
octave:2> gset terminal postscript
octave:3> gshow terminal
        terminal type is postscript landscape noenhanced monochrome dashed
defaultplex "Helvetica" 14
octave:4> replot

you can also set the terminal to other flavors of output, consul the
gnuplot maunal for specifics. The variety of plot types is one of the
advantages of gnuplot.

then you just reset the terminal back to x11.


On Sun, 30 Mar 1997, Jayabharath R. Dondeti wrote:

> Hi,
>
> I have installed Octave on my Linux box recently and it works nice almost similar
> to matlab and works nice. I have a problem printing my plots on to the printer
> or in to a file(post-script). I tried matlab command print -f 'filename' ...
> did not work. I searched on all the on-line documentation...no use.
>
> I will be thankful if you can give me a solution for how to print octve plots.
>
> Thanks a lot,
>
> Jayabharath.
> --
>
>       ******************************************************************
>       Jayabharath Reddy Dondeti   ECE Department,Illinois Inst. of Tech.
>       3301 S. Dearborn St         E-mail: [hidden email]  
>       Chicago, IL 60616-3793      URL: http://www.ece.iit.edu/~jdondeti/ 
>       ******************************************************************
>

*******************************************************************************
 John Utz [hidden email]
        idiocy is the impulse function in the convolution of life