Alan W. Irwin wrote: >> I tried the following, but it gives >> me ellipses, e.g. when called in x12c.c: [...] >> /* get axis ratio */ >> plgvpw(&vpxmin, &vpxmax, &vpymin, &vpymax); >> ratio = (vpxmax -vpxmin) / (vpymax -vpymin); > > What you appear to need is something that returns real device units > (whether they are in pixels, points, or mm doesn't matter since it is > only the ratio the determines the aspect ratio). I therefore suggest > you try plgspa or plgpage.
Thank you - the following works for me: /* get ratio s.t. ellipse appears as circle */ plgvpw(&vpxmin, &vpxmax, &vpymin, &vpymax); axisratio = (vpxmax -vpxmin) / (vpymax -vpymin); plgpage(&px, &py, &pxlen, &pylen, &pxoff, &pyoff); pageratio = pxlen * 1. / pylen; ratio = axisratio / pageratio; -- Robert ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-general mailing list Plplot-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-general