-dpng gives "invalid command"

Thomas Treichl Thomas.Treichl at gmx.net
Fri Jul 10 14:55:06 CDT 2009


John B. Thoo schrieb:
> 
> On Jul 10, 2009, at 11:55 AM, Thomas Treichl wrote:
> 
>>> 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.
> 
> I didn't use Fink or MacPorts for this.  (I do use Fink for other 
> things, like xfig). I d/l'd the gnuplot source from 
> <http://gnuplot.sourceforge.net/> and compiled it.  If I wanted to, how 
> would I have to re-d/l the source and compile it again, but against more 
> libraries?  How would I select more libraries?

The selection of libraries is done automatically (normally) that time you call 
'./configure' in the Gnuplot sources tree. The thing you need to do is to set up 
the needed libraries before and that you make sure that these libs are found by 
your Gnuplot './configure' script. A call to "./configure --help" normally shows 
you which libs or options you can take for compilation.

Eg. your Gnuplot was compiled against Mac's (not so good copy of GNU's) readline 
library, but most others use GNU's readline library (cf. +READLINE -LIBREADLINE 
from your call to "show version long"). Now, you can download GNU's readline and 
configure that one with "configure --prefix=/usr/local". After "make install" 
headers and libs can be found under /usr/local. Calling Gnuplot's "./configure 
--help" gives you a lot but especially "--with-readline=DIR", ie. you configure 
Gnuplot with at least "./configure --prefix=/usr/local 
--with-readline=/usr/local". Finally you now should have compiled Gnuplot 
against GNU's readline, and so on and so on.

Some time ago we wrote http://wiki.octave.org/wiki.pl?OctaveForMac. It describes 
a little bit which libs are necessary on a Mac for compiling Octave. Meanwhile a 
lot more libs are necessary to build a full Octave but the ideas behind it and 
the procedures that are necessary should still be valid (something similar 
should be done for Gnuplot). If you're interested in some more or less ugly 
command line build scripts for Gnuplot.app and Octave.app then check this

http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/admin/MacOSX/Octave.app

Best regards,

   Thomas

>> 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')
> 
> Neat.  Thanks.
> 
> Btw, my apologies to y'all on the list for all this, which, I guess, is 
> not strictly Octave stuff.  Thanks for your indulgence.
> 
> ---John.
> 



More information about the Help-octave mailing list