[prev in list] [next in list] [prev in thread] [next in thread]
List: gnuplot-info-beta
Subject: Re: pngcairo: suggestion for additional option
From: Allin Cottrell <cottrell () wfu ! edu>
Date: 2007-12-31 5:14:51
Message-ID: alpine.LRH.0.999999.0712302349490.10238 () ricardo ! ecn ! wfu ! edu
[Download RAW message or body]
On Fri, 28 Dec 2007, Ethan A Merritt wrote:
> Allin:
>
> I attach a revised version of your patch.
> The changes are:
> - Export pre-calculated values for TERM_XMIN etc taken from the axis
> structures
> - Initialize term->tscale to 1.0 for all terminals that do not provide
> an explicit value
> - Initialize term->tscale for SVG terminal
>
> Please give it a look-over.
This looks good to me. It works fine for the various PNG plots
that I've checked.
> Also please help me figure out which other terminals need an
> explicit scale, and whether the exported variables need to be of
> type double rather than integer. For instance, I think "post
> eps" needs a scale factor of 20, but PostScript coordinates are
> not limited to integers. A test plot gave
> TERM_XMIN = 546
> TERM_XMAX = 6990
> TERM_YMIN = 280
> TERM_YMAX = 4872
> and dividing back by 20 will give non-integral values. I am also worried
> that to actually use these values we would also need to have the offset
> of the coordinate origin relative to the origin of the PostScript page.
> On the other hand, the necessary information is already in the output
> PostScript file, so perhaps it is not necessary to export it as a user
> variable inside gnuplot. What do you think?
I see what you mean about PostScript. I find that TERM_XMIN et al
agree with a readback from the mouse in gv, if I divide by 20
(that is, 2*PS_SC) and add the coordinates of the bottom left of
the bounding box -- that is, (50,50). I also see that division by
the scale factor of 20 yields non-integral values, but I'd think
that for practical purposes having these measurements to the
nearest PostScript point would probably be sufficient.
As for the translation of the bounding box: yes, it's quite easily
readable from the PostScript file. I'm not sure whether a user
would want/expect the measurements net or gross of the PostScript
translation; I think it might be enough to state somewhere that
they are net.
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic