[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Print plot [was Re: Same script for octave/matlab]
From: |
Joao Cardoso |
Subject: |
Print plot [was Re: Same script for octave/matlab] |
Date: |
Thu, 07 Oct 1999 21:18:11 +0100 |
"A. Scottedward Hodel" wrote:
> ----------
> >From: [deleted]
> >To: Ketil Froyn <address@hidden>
> >Subject: Re: Same script for octave/matlab
> >Date: Thu, Oct 7, 1999, 1:50 PM
> >
>
> ...
> >
> > but your browser has a search function, hasn't it?
> >
> >> I looked through some of the 1999 archive, but didn't find
> >> anything.
> >>
>
> My browser has a search function. However, a search for the words
> "octave print" yielded the source to the octave_print_internal
> c++ code, the home page to Octave Communications, Inc., and hand bells
> music for "Christ the Lord is Risen Today." The print function queson is
> not listed in http://www.che.wisc.edu/octave/FAQ.html. The 1999, 1998
> archives only have a note indicating that a solution was posted in the past,
> and the word "print" doesn't appear in the octave-sources archive.
>
> With results like this, a question to help-octave is appropriate.
OK, the 1999 *help* octave didn't give nothing meaningfull with the the simple
search word "print", but the 1998 archive did:
> > | In my print-function I simply use
> > |
> > | gset out "| lpr"
> > |
> > | for sending the output to the printer.
> > | -> no temp file and no sleeping neccessary.
> >
>
> [Sorry, Ketil, I couldn't find it either, but it would be easy
> for you to write one, provided you're not using multiplot features. There
> IS some discusion in the 1998-1999 help-octave archives about printing
> with multiplot.]
sorry me too (and I have sleeped this night :-)). And to repair it, here is an
*old* script of mine that automate it:
# print_plot( lpdest, opt), where opt can be, in this order,
# landscape | portrait | eps | default
# color | monochrome
# solid | dashed
# "fontname"
# fontsize
# name is the printer option to print postscript; system dependent!
#
# NOTE: last settings are retained between invocations.
# as the plot window disapears during the saving and then reapers, it
# is convenient to have a Gnuplot resource file in the app-defaults dir
# with a geometry and position specification, such as
# *geometry: 500x400-0+0
function print_plot( name, opt)
if (nargin == 0)
name = "-dps"; # option passed to `lp' to use printer. System
dependent
endif
if (nargin == 2)
eval( sprintf("gset terminal %s", opt));
else
gset( "terminal postscript eps monochrome dashed") # change for your
default
endif
eval(sprintf("gset output '|lp %s'", name));
replot
gset("terminal X11")
gset("output")
replot
end
>
>
> --
> A S Hodel Assoc. Prof. Dept Elect Eng, Auburn Univ,AL 36849-5201
> On leave at NASA Marshall Space Flight Center (256) 544-1426
> Address until 15 Mar 2000:Mail Code TD-55, MSFC, Alabama, 35812
> http://www.eng.auburn.edu/~scotte
>
> ---------------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL. To ensure
> that development continues, see www.che.wisc.edu/octave/giftform.html
> Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
> ---------------------------------------------------------------------
--
Joao Cardoso | e-mail: address@hidden
INESC, R. Jose Falcao 110 | tel: + 351 2 2094322
4050 Porto, Portugal | fax: + 351 2 2008487
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------