Plot problem?

Ben Abbott bpabbott at mac.com
Thu Jun 25 08:19:06 CDT 2009


On Jun 24, 2009, at 10:04 PM, Robert T. Short wrote:

> Ben Abbott wrote:
>> On Jun 24, 2009, at 2:50 PM, Robert T. Short wrote:
>>>
>>> John W. Eaton wrote:
>>>> On 16-Jun-2009, Robert T. Short wrote:
>>>>
>>>> | And on that note.....
>>>> | | This may be a gnuplot problem.  I don't know.  I am running  
>>>> 4.2 (the | current debian lenny gnuplot package).  I confess to  
>>>> being somewhat | overwhelmed by the plot/graphics threads so this  
>>>> may have already been | addressed.  If so, I apologize in advance.
>>>> | | The attached script is a vastly simplified version of  
>>>> something I do a | lot of.  It draws circles with lines between  
>>>> them.
>>>> | | I frequently print to encapsulated PostScript or fig,  
>>>> depending on | whether I further need to annotate the plot or not.
>>>> | | There are two problems: 'axis square' doesn't seem to work  
>>>> and line | styles don't print correctly.
>>>> | | --- With either 'axis square' or 'axis equal', the axes come  
>>>> out unequal | so the circles are smashed.
>>>>
>>>> I don't see this with the current Octave sources or 3.2.0.  I'm  
>>>> using
>>>> gnuplot 4.2 patchlevel 5 on a Debian testing system.
>>>>
>>>> | --- The on-screen plot comes out with the line styles and  
>>>> colors | specified.  The fig file cycles through the colors for  
>>>> both the circles | and the lines.  The eps file gets the colors  
>>>> right, but not the line styles.
>>>>
>>>> As I recall, mixing line styles and colors has never really worked
>>>> correctly in gnuplot and the behavior is terminal dependent.  But
>>>> maybe things have changed lately?  I'm not sure.
>>>>
>>>> | In MATLAB, I can't do fig files of course, but it gets the eps  
>>>> file | right EXCEPT it loses all the colors....
>>>>
>>>> Did you use -depsc or -deps?
>>>>
>>>> jwe
>>>> k
>>>
>>> Interesting.
>>>
>>> I am using 4.2 patchlevel 2, but installed patchlevel 5 and got  
>>> the same thing.
>>>
>>> This is with the tip as of Saturday or so.  Note that a standard  
>>> 4/3 monitor ALMOST works, but not quite.
>>> This is the difference between using octave and going back to  
>>> MATLAB, so I have been playing with gnuplot and looking through  
>>> the octave sources to find out what is going on.  I will let you  
>>> know - a patch if I can figure it out or a second request if I  
>>> can't.  MATLAB doesn't really work either though, because I need  
>>> to do some fairly complex annotation and way prefer to use xfig  
>>> for that.
>>>
>>> Bob
>>
>> I tried gnuplot-4.2.2, gnuplot-4.2.5, and gnuplot's developers  
>> sources, all with Octave's current sources. They each give me  
>> perfect circles.
>>
>> Bob, I notice your script allows the user to "Resize if desired,  
>> then press enter" ... By chance are you resizing the window via the  
>> mouse and expecting Octave to handle fixing the aspect ratio for you?
>>
> I tried both resizing and not resizing.  If I resize, the plot is  
> redrawn and the circles are screwed up again.
>
> So, if nobody else is seeing this, I wonder if I have some kind of  
> configuration problem?
>
> Well, don't sweat it.  I will find out what is happening.

(Robert, we fell of the list, so I'm replying a second time).

For display to the screen, I suspect that you see exactly what I see.  
Please confirm ...

(1) If you do *not* resize the window, you get perfect circles.

(2) If you *do* resize the window, you get ellipses.

(3) If you *do* resize the window, and the "print -depsc test.eps",  
the displayed window and the eps file both have perfect circles.

Gnuplot does not detect changes in size or position of its figure  
windows. Thus, gnuplot will not correct for changes in aspect ratio  
made by the mouse. However, if Octave redraws the window the aspect  
ratio will be corrected.

You might be satisfied by switching to the wxt terminal ...

	close all
	setenv ("GNUTERM", "wxt")
	
... and then do your plotting again. With gnuplot-4.2.5, the wxt  
terminal does not permit the aspect ratio of the gnuplot result to be  
modified.

Ben




More information about the Octave-maintainers mailing list