On 2007-08-18 14:12-0400 Hazen Babcock wrote: > > On Aug 16, 2007, at 9:41 PM, Alan W. Irwin wrote: > >> On 2007-08-08 14:27-0700 Alan W. Irwin wrote: >> >> Just to review the status here of Hazen's work on dealing with the various >> cairo issues I brought up... >> >> (3) There are 3D plot labelling problems. For example, if you >> look at example 8, the y-axis labels and the left-hand z-axis labels are >> oriented properly but their size is too large. The x-axis labels and the >> right-hand z-axis labels are fine. To verify this bug try the combination >> of alt=20, az=10. The wrong size for the labels knocks your eye out. >> The equivalent test for -dev psc gives reasonable looking results. > > This one is really puzzling to me. I'm doing what I thought was correct, i.e. > the text transform matrix is the product of a rotation (r) and shear (s) > matrix. > > [xf] = [ c(r) s(r)][1 t(s)][xo] > [yf] [-s(r) c(r)][0 1][yo]
I am not that familiar with shear transformations, but I tried to follow what you did using the Wikipedia articles http://en.wikipedia.org/wiki/Rotation_(mathematics) and http://en.wikipedia.org/wiki/Shear_(mathematics). They appear to be reasonably consistent with your equation above. Multiplying out the matrices gives the transformation matrix xf c(r) c(r)*t(s) + s(r) xo = * yf -s(r) -s(r)*t(s) + c(r) yo and this appears (see http://cairographics.org/manual/cairo-cairo-matrix-t.html) to be what you implemented by the following code in cairo.c: cairo_matrix_init(cairoTransformMatrix, cos_rot, -sin_rot, cos_rot * tan_shear + sin_rot, -sin_rot * tan_shear + cos_rot, 0,0); I would double-check your definition of the rotation angle to make sure the rotation matrix should not be replaced by its transpose and similarly for the shear matrix. But such considerations should affect only the amount of rotation and shear applied (which are correct), and should not affect the size of the character (which is the issue here). What decides the size of the sheared and rotated character that is rendered by cairo? I think it is that cairo (and equivalent ps.c) logic that you should review. There may be some character scaling done by the PLplot core that has to be compensated by each device for the rotated and sheared characters appearing in 3D plots. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel