help-octave
[Top][All Lists]
Advanced

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

Re: Octave plot on Windows


From: Benjamin Lindner
Subject: Re: Octave plot on Windows
Date: Tue, 02 Feb 2010 10:41:17 +0100

> 
> Dear all,
> 
> I'm using octave 3.2.3, I'm observing that when I plot something like:
> x = [-5:0.1:5];
> y = sin(x);
> plot(x,y);
> 
> The gnuplot window is very big, and the gnuplot version is not the
> wgnuplot
> (see image).

This is because octave chooses matlab compatibility and therefore
manually defines the axes' origin and extension which overrides 
gnuplot's own positioning algorithms.
Whether this is a wise choice or not can be discussed, but that's
how it is at the moment.

> So my question: Is there a way to set the default plot as wgnuplot layout?

There is a way, but not a straightforward way.

Mind you that this is *not* official, highly dirty, completely 
untested, not recommendable, and possibly utterly wrong so use 
at your own risk.

That being said you can for example do:

1) disable octave's manual positioning-of-axes altogether by
commenting out lines 61-64 in __go_draw_axes__
( where the "set {lrtb}margin" statements are issued )

or

2) make it somehow flag-able. Without adding a new axes property 
you could for example say that if the axes' position is NaN then
octave should not set the position, and do this by enclosing said
lines in __go_draw_axes__ in a if(~isnan(pos)) ... endif statement


Moving to serious discussion again,
Now since the question has been raised, I'd like to follow it up.
Disabling gnuplot's own layout when plotting has also slightly 
disturbed me. gnuplot doesn't do such a bad job on this, so 
duplicating this into octave doesn't improve it IMO, and currently 
*I* need to define the layout when gnuplot could do it for me.
I understand that octave wants to mimick the other side's features,
but in this case it would be nice to be able to disable it.

So how are the chances of getting a feature to disable the manual
positioning octave does.
Thinking about imlpementation, I believe it could be done by adding an
axes property ("positionmode" ?) acting as flag whether to have gnuplot 
determine the axes position (kind of an "auto" setting) or if the 
position should be calculated by octave (kind of a "manual" setting 
or "octave" setting). Then there is of course the possibility that 
the user manually really wants to define the axes positions ("user" 
setting?).

Or is there already a manual/auto switch for the position like for 
the axes x/y/z ranges?

comments?

> How can I fix the window size?

The window size is defined in the wgnuplot.ini file.
There you'll find the entries

GraphOrigin=186 215
GraphSize=499 350

(with differing numbers of course)
designating the position and size of the plot window
for the windows terminal.

benjamin
-- 
NEU: Mit GMX DSL über 1000,- ¿ sparen!
http://portal.gmx.net/de/go/dsl02


reply via email to

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