[GRASS-user] Labelling in gis.m profile tool

Michael Barton michael.barton at asu.edu
Sat Mar 10 15:02:55 EST 2007




On 3/9/07 7:04 AM, "Patton, Eric" <epatton at nrcan.gc.ca> wrote:

> Patton, Eric wrote:
>>> Does the gis.m profiler now have additional labels on the x and y
>>> axes? I've updated to the latest cvs along with make distclean, but
>>> the profiler only labels the maximum and minimum on the y-axis. IIRC,
>>> there was some discussion between Michael and Hamish about recent
>>> improvements to the profiler, but I can't locate the thread.
> 
> Hamish:
>> The profiler (or for that matter the GIS) has no idea what the units of
>> the raster map are, so the y axis can't be labeled. There is no
>> formalized raster map meta-data spot for that so we can't just pluck it
>> from the map, and assuming meters is Bad.

> 
> Would there be a way to fit in an optimal number of labels soley based on the
> amount of postscript space being used by the y-axis? The profiler seems to
> output an eps of the same dimensions each time, so couldn't the label size be
> used as a unit of measurement itself for fitting additional labels along each
> axis? Like an equal interval spacing or something.
> 
> ~ Eric.
> 

Eric,

Are you referring to axis labels or tick marks? As Hamish pointed out, there
is no way to know what units the y axis is in.

There is probably a way to optimize the number of tick marks, but I haven't
worked it out and it may be complicated across different system
architectures. The axes have to be drawn in pixels, mm, cm, or inches
(though I'm not sure how consistent the relationship between pixels and
distance units is across systems). The fonts are in points. I don't think
that there is a consistent relationship between points and pixels across
systems either. Maybe the trick would be to draw the axes in inches.
However, automatic scaling is still kind of tricky (e.g., setting an
aesthetic max and min to the nearest 1/10/100...). You kind of need to do
that first to make nice tick marks (e.g., you wouldn't want tick marks that
represent divisions of 113.267 m)

I arbitrarily picked x and y axis lengths that seemed to "look pretty good".
However, they rescale dynamically as the window is changed. I was assuming
initially that most people would drop the eps into a graphics program to
touch it up if they wanted publishable quality. TclTk has some on-screen
page layout capabilities, but they are not particularly rich or strong.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-user mailing list