[gradsusr] Image axis label aspect ratio.

Jennifer Adams jma at cola.iges.org
Thu Jun 26 10:55:27 EDT 2014

On Jun 25, 2014, at 12:05 PM, Ryglicki, David CIV FNMOC wrote:

> Greetings, GrADS list.
> Although, I think, this is probably a question for Jennifer specifically. In the attached image I created using (Open)GrADS 2.1.a2, I took advantage of the new font capabilities and used the Utopia font class. On the right side, "Members" and "NVG" are both produced using "set strsiz 0.18". This gives the more square-looking fonts - aspect ratio of 1:1 - that we see in word processors like Word and Writer.
I have noticed that some fonts look better if you specify *both* the hsize and vsize with 'set strsiz' -- many fonts look odd with the 1:1 ratio. There is no reason why the GrADS defaults would look right for every font. And we think the ability to stretch the fonts in either direction is a nice feature -- gives you more flexibility to control how things look and squeeze strings into spaces that would otherwise not fit. 

> But the axes and labels are stretched to GrADS's default font aspect ratio of 6:5 (y:x). At least, I think from trial and error on my end, it's 6:5.
The axis labels have a width that is 80% of the height; the height is specified with 'set xlopts' and 'set ylopts'. That 80% is a hard-coded number at the moment. I will put it on my to-do list to implement an extra argument for 'set xlopts' and 'set ylopts' to specify a width as well. 

> I've added a sample image from gnuplot with the Utopia font class that does not have this stretching on the axis labels.
> Anyway, is there a way to override this before I give the "draw xlab/ylab/title" commands?
Drawing xlab, ylab, and title use different string settings than the axis tic labels. I usually prefer to control these labels more completely by using the string setting commands and 'draw string' instead.

If you really feel strongly about the ugliness of the 80% aspect ratio, you can draw the axis labels manually with 'draw string' as well, it would just take a bit of extra scripting. 

> Additionally, if there is no way to do this from GrADS itself, can you provide vague directives to modify the source code to fix this?
I will implement this change for the next release. 
> Thanks.
> ~Dave
> <nvg.prob-wind_10m.area.30N-35N_120W-115W.png><gnuplot-example.png>_______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140626/066c6d41/attachment.html 

More information about the gradsusr mailing list