|
From: Thomas S. <t.s...@fz...> - 2009-12-09 15:40:05
|
those interactive terminals use an internal screen of a fixed
size which is then scaled to fit into the actual canvas window.
e.g. X11:
GPVAL_TERM_XMIN = 285
GPVAL_TERM_XMAX = 4000
GPVAL_TERM_YMIN = 236
GPVAL_TERM_YMAX = 4019
always nearly the same values (differ a little bit due to some
adjustments of the margins because the font size is not scaled),
regardless of the actual window size and aspect ratio.
if you plot into an x11 terminal, look at the GPVAL_TERM_*
variables, then change the plot window size with the mouse,
replot (is needed to change the variables), and look at the
variables again, you will see that there is not much change.
i think this applies to the wxt terminal in a similar way, but i
don't have a wxt terminal here, so i can't test it.
the scaling factors (internal canvas <-> canvas window on
screen) are not fixed but depend on the actual window
shape, and they are not accessible via to GPVAL_* variables.
simple bitmap terminals (e.g. gif) are different, here the
pixels are mapped 1:1.
ZoltánVörös wrote:
>
> Thomas Sefzick <t.sefzick <at> fz-juelich.de> writes:
>
>>
>>
>> the variables
>> GPVAL_TERM_XMIN, GPVAL_TERM_XMAX,
>> GPVAL_TERM_YMIN, GPVAL_TERM_YMAX
>> give the corners of the graph in pixels.
>> (you need version 4.4)
>>
>> together with the information in
>> GPVAL_X_MIN, GPVAL_X_MAX, ...
>> it should be easy to translate data point coordinates into
>> pixels and vice-versa.
>
> Yes, this is clear, but what you state above is not correct: if I do this
>
> plot sin(x)
>
> on a wxt terminal, then I get this
> GPVAL_TERM_XMIN = 1215
> GPVAL_TERM_XMAX = 12394
> GPVAL_TERM_YMIN = 678
> GPVAL_TERM_YMAX = 7355
>
> while my window is only 640 X 380 pixels. I think, the number of
> pixels is multiplied by 20, and that gives GPVAL_TERM_XMIN and
> the like. But is this 20 a universal number? If I change to a
> different terminal, can I still trust my numbers?
> Cheers,
> Zoltán
>
>
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://old.nabble.com/What-is-the-meaning-of-the-terminal-variables--tp26700899p26712247.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|