-dpng gives "invalid command"
Thomas Treichl
Thomas.Treichl at gmx.net
Fri Jul 10 13:13:37 CDT 2009
John B. Thoo schrieb:
> On Jul 10, 2009, at 10:56 AM, Ben Abbott wrote:
>> On Friday, July 10, 2009, at 12:37PM, "John B. Thoo"
>> <jthoo at yccd.edu> wrote:
>>> Hi, everyone.
>>>
>>> I can save a plot to EPS by
>>>
>>> print ("foo.eps", "-deps")
>>>
>>> but when I try to save a plot to PNG by
>>>
>>> print ("foo.png", "-dpng")
>>>
>>> I get a run of errors like
>>>
>>>
>>> gnuplot> e
>>> ^
>>> line 0: invalid command
>>>
>>>
>>> and no plot is saved.
>>>
>>> What am I doing wrongly?
>>>
>>> I'm using Octave 3.0.5 and gnuplot 4.2 patchlevel 5 in an X11 xterm
>>> window in Mac OS X 10.4.11.
>>>
>>> Thanks.
>>>
>> I have no problem producing png output with 3.2 and gnuplot 4.2.5.
>>
>> Can you run gnuplot and try ...
>>
>> set term png
>> set output foo.png
>> plot sin(x)
>> quit
>>
>> Do you still get the error?
>
> Hi, Ben. When I open gnuplot separately from Octave and try to "set
> term png", I get this error:
>
>
> [533] bash-2.05b$ gnuplot
>
> G N U P L O T
> Version 4.2 patchlevel 5
> last modified Mar 2009
> System: Darwin 8.11.0
>
> Copyright (C) 1986 - 1993, 1998, 2004, 2007 - 2009
> Thomas Williams, Colin Kelley and many others
>
> Type `help` to access the on-line reference manual.
> The gnuplot FAQ is available from http://www.gnuplot.info/faq/
>
> Send bug reports and suggestions to <http://sourceforge.net/
> projects/gnuplot>
>
>
> Terminal type set to 'aqua'
> gnuplot> set term png
> ^
> unknown or ambiguous terminal type; type just 'set
> terminal' for a list
>
> gnuplot>
>
>
> When I type just "set terminal" for a list of available terminals
> types, I get:
>
> Available terminal types:
> aed512 AED 512 Terminal
> aed767 AED 767 Terminal
> aifm Adobe Illustrator 3.0 Format
> aqua Interface to graphics terminal server for Mac OS X
> bitgraph BBN Bitgraph Terminal
> cgm Computer Graphics Metafile
> corel EPS format for CorelDRAW
> dumb ascii art for anything that prints text
> dxf dxf-file for AutoCad (default size 120x80)
> eepic EEPIC -- extended LaTeX picture environment
> emf Enhanced Metafile format
> emtex LaTeX picture environment with emTeX specials
> epslatex LaTeX picture environment using graphicx package
> epson_180dpi Epson LQ-style 180-dot per inch (24 pin) printers
> epson_60dpi Epson-style 60-dot per inch printers
> epson_lx800 Epson LX-800, Star NL-10, NX-1000, PROPRINTER ...
> fig FIG graphics language for XFIG graphics editor
> gpic GPIC -- Produce graphs in groff using the gpic
> preprocessor
> hp2623A HP2623A and maybe others
> hp2648 HP2648 and HP2647
> hp500c HP DeskJet 500c, [75 100 150 300] [rle tiff]
> hpdj HP DeskJet 500, [75 100 150 300]
> hpgl HP7475 and relatives [number of pens] [eject]
> hpljii HP Laserjet series II, [75 100 150 300]
> hppj HP PaintJet and HP3630 [FNT5X9 FNT9X17 FNT13X25]
> imagen Imagen laser printer
> kc_tek40xx MS-DOS Kermit Tek4010 terminal emulator - color
> km_tek40xx MS-DOS Kermit Tek4010 terminal emulator - monochrome
> latex LaTeX picture environment
> mf Metafont plotting standard
> mif Frame maker MIF 3.00 format
> mp MetaPost plotting standard
> nec_cp6 NEC printer CP6, Epson LQ-800 [monocrome color
> draft]
> okidata OKIDATA 320/321 Standard
> pbm Portable bitmap [small medium large] [monochrome
> gray color]
> pcl5 HP Designjet 750C, HP Laserjet III/IV, etc. (many
> options)
> postscript PostScript graphics, including EPSF embedded
> files (*.eps)
> pslatex LaTeX picture environment with PostScript \specials
> pstex plain TeX with PostScript \specials
> pstricks LaTeX picture environment with PSTricks macros
> qms QMS/QUIC Laser printer (also Talaris 1200 and
> others)
> regis REGIS graphics language
> selanar Selanar
> starc Star Color Printer
> svg W3C Scalable Vector Graphics driver
> tandy_60dpi Tandy DMP-130 series 60-dot per inch graphics
> tek40xx Tektronix 4010 and others; most TEK emulators
> tek410x Tektronix 4106, 4107, 4109 and 420X terminals
> texdraw LaTeX texdraw environment
> tgif TGIF X11 [mode] [x,y] [dashed] ["font" [fontsize]]
> tkcanvas Tk/Tcl canvas widget [perltk] [interactive]
> tpic TPIC -- LaTeX picture environment with tpic
> \specials
> unknown Unknown terminal type - not a plotting device
> vttek VT-like tek40xx terminal emulator
> x11 X11 Window System
> xlib X11 Window System (gnulib_x11 dump)
> (END)
>
>
> so I see that png is not on the list. (No "gif" either.) Hmm ... I
> guess that explains it. What do you suggest I do?
>
> Thanks.
>
> ---John.
Can you please once again type 'show version long' in Gnuplot and send the
output of this command once again? Thanks, Thomas
More information about the Help-octave
mailing list