-dpng gives "invalid command"

Thomas Treichl Thomas.Treichl at gmx.net
Fri Jul 10 13:55:11 CDT 2009


John B. Thoo schrieb:
> 
> On Jul 10, 2009, at 11:29 AM, Thomas Treichl wrote:
> 
>> John B. Thoo schrieb:
>>> Hi, Thomas.
>>> gnuplot> show version long
>>>         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>
>>> Compile options:
>>> +READLINE  -LIBREADLINE  +HISTORY  +BACKWARDS_COMPATIBILITY  
>>> +BINARY_DATA
>>> -LIBGD
>>> -NOCWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +USE_MOUSE  +HIDDEN3D_QUADTREE
>>> +DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE
>>> DRIVER_DIR     = "/usr/local/libexec/gnuplot/4.2"
>>> GNUPLOT_PS_DIR = "/usr/local/share/gnuplot/4.2/PostScript"
>>> HELPFILE       = "/usr/local/share/gnuplot/4.2/gnuplot.gih"
>>> gnuplot>
>>> Thanks.
>>> ---John.
>>
>> Then yes, you're right - you're missing support for *png. Your version 
>> of Gnuplot has not been compiled against libgd. libgd (and libpng and 
>> libjpg...) is the library that you need to create graphics in *png, 
>> *jpg and *gif.
>>
>> As your binary is in /usr/local I would expect you either compile and 
>> install Gnuplot for yourself or you use MacPorts? Either or, you need 
>> a binary that should give you something like this to save in *png on 
>> your Mac (compare compile options GD_* from my machine with yours):
>>
>>   gnuplot> show version long
>>
>>         G N U P L O T
>>         Version 4.2 patchlevel 5
>>         last modified Mar 2009
>>         System: Darwin 8.11.1
>>
>>         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>
>>
>>   Compile options:
>>   -READLINE  +LIBREADLINE  +HISTORY  +BACKWARDS_COMPATIBILITY  
>> +BINARY_DATA
>>   +GD_PNG  +GD_JPEG  +GD_GIF  +ANIMATION
>>   -NOCWDRC  +X11  +X11_POLYGON  +MULTIBYTE  +USE_MOUSE  
>> +HIDDEN3D_QUADTREE
>>   +DATASTRINGS  +HISTOGRAMS  +OBJECTS  +STRINGVARS  +MACROS  +IMAGE
>>
>>   DRIVER_DIR     =
>> "/Users/Thomas/bin/Octave.app.3.2.0/Gnuplot.app/Contents/Resources/libexec/gnuplot/4.2" 
>>
>>   GNUPLOT_PS_DIR = "/tmp/gnuplot-i386/share/gnuplot/4.2/PostScript"
>>   HELPFILE       = 
>> "/Users/Thomas/bin/Octave.app.3.2.0/Gnuplot.app/Contents/Resources/share/gnuplot/4.2/gnuplot.gih" 
>>
>>
>> Hope this helps somehow,
>>
>>   Thomas
> 
> Hi, Thomas.
> 
> Yes, I compiled gnuplot myself.  (I guess that was a mistake.)  Would 
> the easiest thing for me to do now be to install gnuplot from your 
> octave-3.2.0-ppc.dmg?
> 
> If I drag-and-drop gnuplot from the .dmg into my Applications folder, 
> would I then have to do anything in particular to use it instead of my 
> previous installation?
> 
> Thanks again.
> 
> ---John.

Hi John,

why a mistake? From my point of view it is good if you try to compile things for 
yourself. You just need to set up some more libraries before compiling Gnuplot.

Suggestion: If you already use Fink or MacPorts then this might be a better 
solution to install Gnuplot that way. If you have none of those or prefer 
Gnuplot.app beside others you can also use Gnuplot.app, yes. There nearly is 
nothing more to do: Drag'n'Drop Gnuplot.app from the *dmg to your Applications 
folder and then set another link to use Gnuplot.app from command line, too 
(maybe you should remove or rename or uninstall /usr/local/bin/gnuplot* before):

   sudo ln -s /Applications/Gnuplot.app/Contents/Resources/bin/gnuplot 
/usr/local/bin/gnuplot

Finally just type 'gnuplot' in Terminal.app and check once again 'show version 
long'. Start your Octave and check

   octave-3.2.0:1> system ('which gnuplot')

Best regards,

   Thomas



More information about the Help-octave mailing list