Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Scale in 3D plot

34 views
Skip to first unread message

Naha

unread,
Nov 18, 2008, 11:42:05 AM11/18/08
to
Hello all,

First of all, I am a Gnuplot newbie (and not a native English speaker),
so please be indulgent :-).

I know the topic appears frequently, but I cannot find any solution to
my problem. I have a 3D plot representing an itinerary into an indoor
area; at this point, it looks like that:
http://mouchevii.free.fr/fichiers/vrac/best_coord.pdf

As you can see, the scale is bad: I would like to have something like
that: http://mouchevii.free.fr/fichiers/vrac/best_coord.png
That is an older version manually modified with Inkscape. I obtained the
base graph with "set xrange [0:30]", but unmodified it looks like that:
http://mouchevii.free.fr/fichiers/vrac/best_coord_xrange.pdf

I tried with "set size ratio", but it works only with 2D plots, and
other things like "set size 1,3", "set table", but nothing looks good.

So, the point is: it is really impossible to do that (as many people
say)?
If yes, is it possible (and acceptably easy) to hack Gnuplot to add
this possibility?

Thanks for your answers,

Naha

--
)( | |_ [] Y |\| /\ |-| /\

sfeam

unread,
Nov 18, 2008, 12:28:33 PM11/18/08
to
Naha wrote:
> I know the topic appears frequently, but I cannot find any solution to
> my problem. I have a 3D plot representing an itinerary into an indoor
> area; at this point, it looks like that:
> http://mouchevii.free.fr/fichiers/vrac/best_coord.pdf
>
> As you can see, the scale is bad: I would like to have something like
> that: http://mouchevii.free.fr/fichiers/vrac/best_coord.png
> That is an older version manually modified with Inkscape. I obtained the
> base graph with "set xrange [0:30]", but unmodified it looks like that:
> http://mouchevii.free.fr/fichiers/vrac/best_coord_xrange.pdf
>
> I tried with "set size ratio", but it works only with 2D plots, and
> other things like "set size 1,3", "set table", but nothing looks good.
> If yes, is it possible (and acceptably easy) to hack Gnuplot to add
> this possibility?

The CVS version of gnuplot (version 4.3) supports a command

set view equal_axes

It forces the x and y axes in a 3D plot to use the same scale.


Xiloynaha

unread,
Nov 19, 2008, 3:14:47 AM11/19/08
to
Le 18-11-2008, sfeam a écrit :
> The CVS version of gnuplot (version 4.3) supports a command
> set view equal_axes
> It forces the x and y axes in a 3D plot to use the same scale.

Thanks, that is what I was looking for.

But the drawing area is not adapted to the plot size:
http://mouchevii.free.fr/fichiers/vrac/best_coord_4.3.pdf
Is there a tip to adapt it automaticaly? (And move the legend on
top-left of the plot, or something like that?)

Thanks again,

sfeam

unread,
Nov 19, 2008, 1:41:31 PM11/19/08
to
Xiloynaha wrote:

> Le 18-11-2008, sfeam a écrit :


>> The CVS version of gnuplot (version 4.3) supports a command
>> set view equal_axes
>> It forces the x and y axes in a 3D plot to use the same scale.
>
> Thanks, that is what I was looking for.
>
> But the drawing area is not adapted to the plot size:
> http://mouchevii.free.fr/fichiers/vrac/best_coord_4.3.pdf
> Is there a tip to adapt it automaticaly?

Not really. The program leaves enough space so that the graph
stays entirely inside the window without rescaling while you
rotate the graph interactively. For any specific set of view
angles there is whitespace on one or more edges of the window.
You can adjust the scale interactively using the middle mouse
button and dragging horizontally. But then if you rotate to
another viewpoint, probably part of the graph will go off-screen.


> (And move the legend on top-left of the plot, or something like that?)

set key at screen 0.05, 0.95

Naha

unread,
Nov 19, 2008, 2:18:10 PM11/19/08
to
Le 19-11-2008, sfeam wrote:
> The program leaves enough space so that the graph
> stays entirely inside the window without rescaling while you
> rotate the graph interactively. For any specific set of view
> angles there is whitespace on one or more edges of the window.
> You can adjust the scale interactively using the middle mouse
> button and dragging horizontally.

No mouse with the Postscript terminal, unfortunately! :-D
Actually, I would like to include the EPS file generated by Gnuplot directly
into my LaTeX document… But never mind, I will deal with Inkscape again
to obtain what I exactly want.

>> (And move the legend on top-left of the plot, or something like that?)
>
> set key at screen 0.05, 0.95

I will try, thanks.

0 new messages