help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Empty plot


From: bpabbott
Subject: Re: Empty plot
Date: Fri, 17 Dec 2010 20:40:20 +0000 (GMT)

On Dec 17, 2010, at 03:21 PM, "John B. Thoo" <address@hidden> wrote:


On Dec 17, 2010, at 11:57 AM, bpabbott wrote:

> On Dec 17, 2010, at 02:24 PM, "John B. Thoo" <address@hidden> wrote:
>
>> On Dec 17, 2010, at 8:26 AM, bpabbott wrote:
>>
>> > On Dec 17, 2010, at 09:24 AM, "John B. Thoo" <address@hidden> wrote:
>> >
>> >> On Dec 17, 2010, at 5:19 AM, Ben Abbott wrote:
>> >>
>> >> > On Dec 16, 2010, at 10:39 PM, John B. Thoo wrote:
>> >> >
>> >> >> Hi. I'm sorry if this is a FAQ, but I haven't been able to find an answer.
>> >> >>
>> >> >> I'm using Octave 3.2.3 on Mac OS X 10.6.4 in X11. When I try to plot, I get an empty plot window and this:
>> >> >>
>> >> >> octave-3.2.3:1> getenv ("GNUTERM")
>> >> >> ans = x11
>> >> >> octave-3.2.3:2> x = 0:0.1:pi;
>> >> >> octave-3.2.3:3> plot (x, sin(x))
>> >> >> octave-3.2.3:4>
>> >> >> gnuplot> set palette file "-" binary record=64 using 1:2:3:4;
>> >> >> ^
>> >> >> line 0: Gray scale not sorted in gradient.
>> >> >>
>> >> >>
>> >> >> octave-3.2.3:4>
>> >> >>
>> >> >> When I start gnuplot on its own, I see that I have Version 4.2 patchlevel 5.
>> >> >>
>> >> >> Any help would be appreciated. Thanks.
>> >> >>
>> >> >> ---John.
>> >> >>
>> >> >> -----------------------------------------------------------------------
>> >> >> "There are no atheists in foxholes."
>> >> >> ---Fr. William T. Cummings, M.M. (WWII, Philippines)
>> >> >> [_The Grunt Padre_, CMJ Marian Pub., p. 56]
>> >> >
>> >> > http://atheism.about.com/od/atheismmyths/a/AtheistsFoxhole.htm
>> >> >
>> >> > John, please tell us where you got your Octave. Was it from MacPorts, Fink, Sourceforge, or somewhere else?
>> >> >
>> >> > Also it is possible to have more than one version of gnuplot. Please check which one Octave is using by typing ...
>> >> >
>> >> > __gnuplot_version__
>> >> >
>> >> > Since you're set up to use X11, please make sure the X11.app is running before you try to plot. I've had some troubles in X11 on MacOS X, and often have to quit X11 and start it again.
>> >> >
>> >> > Ben
>> >>
>> >> Hello, Ben. Thanks for your reply.
>> >>
>> >> I'm using Thomas Treichi's binary of Octave from sourceforge. The thing is that I could plot in X11 using Thomas's previous version on my former PowerBook 12". It was only after upgrading to Octave 32.3 i386 because I had gotten a MacBook Pro that plotting broke.
>> >>
>> >> I had asked about this previously
>> >>
>> >> <http://octave.1599824.n4.nabble.com/set-palette-file-quot-quot-binary-record-64-using-1-2-3-4-td2292036.html>
>> >>
>> >> but didn't get any reply then. Unfortunately, I haven't been able to figure out the problem since, either.
>> >>
>> >> By the way, this is what Octave returns for gnuplot version:
>> >>
>> >> octave-3.2.3:1> __gnuplot_version__
>> >> ans = 4.2.5
>> >> octave-3.2.3:2>
>> >>
>> >> Thanks again for your reply.
>> >>
>> >> ---John.
>> >
>> > I haven't encountered the specific problem you are seeing. However, since you are using SnowLeopard, you'll want to read the link below, before upgrading to 10.6.5.
>> >
>> > http://sourceforge.net/projects/octave/files//Octave%20MacOSX%20Binary/2009-10-03%20binary%20of%20Octave%203.2.3/README_OSX1065txt/view
>> >
>> > If you stick to 10.6.4, you might try installing a newer version of gnuplot. Be sure to place it where the one from Thomas' bundled is ... or use the "gnuplot_binary" function to point to the new one.
>> >
>> > Ben
>>
>> Thanks for the link, Ben. That will come in handy.
>>
>> On a lark, I typed in an xterm window "which gnuplot" and got this:
>>
>> [502] bash-3.2$ which gnuplot
>> /usr/bin/gnuplot
>> [503] bash-3.2$ /usr/bin/gnuplot
>>
>> G N U P L O T
>> Version 42 patchlevel 5
>> last modified Mar 2009
>> System: Darwin 10.4.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 'x11'
>> gnuplot> quit
>> [504] bash-3.2$
>>
>> I had compiled this from source when I also compiled Octave from source (before I began to use Thomas's binary).
>>
>> So, perhaps I'm not using the Gnuplot.app binary that is in the Applications folder with Octave.app. Could this be a problem? If it could, what would be a way to fix this? (What is the "gnuplot_binary" function?)
>>
>> Thanks again.
>>
>> ---John.
>
> I recommend you uninstall the gnuplot you built from source. My understanding is that the gnuplot makefile includes an "uninstall" target.

To do this, do I type

make uninstall gnuplot

I should note, that I haven't done an uninstall myself, but read some references on various mail-lists.

When you built gnuplot you would have had a directory with the sources in it. To install you would have typed the commands

./configure
make
make install

To uninstall, you'd type "make uninstall" from the same directory.

from inside /usr/bin? (Sorry, I'm not sure about these Unix'y things. I know just enough to be dangerous, but not enough to be constructive.)


> I'm not recommending you not build gnuplot and/or octave from the sources. I do that myself, and and would like to see other OSX users do so as well. If you want to build either of those, I recommend using Fink or MacPorts to supply the dependencies (MacPorts is a better choice for Octave's dependencies). You may even want to create a local package for Fink to allow for easy management of these apps (or a port file for MacPorts). If you build independent of the Fink and MacPorts, I recommend you use "/usr/local/..." as the installation prefix.

I'll keep that in mind. For the moment, I'm happy to use Thomas's binary. :-)


> The gnuplot_binary function is an octave function that lets to tell octave which gnuplot binary you'd like to run.
>
> See the help for more info.
>
> help gnuplot_binary
>
> To see which gnuplot Octave is using, type ...
>
> system (sprintf ("which %s", gnuplot_binary))

octave-3.2.3:2> system (sprintf ("which %s",gnuplot_binary))
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot
ans = 0
octave-3.2.3:3>

So, apparently Octave is using Gnuplot.app in the Applications folder. (Should I still uninstall /usr/bin/gnuplot?)
 

What happens if you ...

gnuplot_binary ("/usr/bin/gnuplot")
close all
plot (1:10)

Ben

reply via email to

[Prev in Thread] Current Thread [Next in Thread]