plot legends - pvwave [message #4859] |
Sat, 19 August 1995 00:00  |
Pearson J E
Messages: 7 Registered: August 1995
|
Junior Member |
|
|
My query concerns the addition of legends on plots created by pvwave.
As I understand it, the positioning of a legend can only be accomplished by
using the XYOUTS function where x and y represent coordinates corresponding to
the x and y axis of the plot. In my sistuation I have a 2D graph whose axis can
vary significantly depending on choices made in the program. Therefore by using
the XYOUTS function my words often can end up on top of each other or not even
on the plot itself.
Is there anyway of making the positioning of the legend independent of the x
and
y axis of the plot ??
Any help much appreciated, thanks!!
--
|Jonathan Pearson - Postgrad| Why Waste Time Learning? |
| Computer Science Dept. | When Ignorance Is Instantaneous! |
|University Of Essex,England| |
| Mail--jepear@essex.ac.uk | - Hobbes, from Calvin and Hobbes fame |
|
|
|
Re: plot legends - pvwave [message #4946 is a reply to message #4859] |
Tue, 22 August 1995 00:00   |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
In article <41al9g$4pb@hacgate2.hac.com>, rep2857@sbsun0010.sbrc.hac.com (Mike Schienle) writes:
> In article <414qlu$ts7@seralph9.essex.ac.uk>,
> Pearson J E <jepear@essex.ac.uk> wrote:
>> My query concerns the addition of legends on plots created by pvwave.
>>
>> As I understand it, the positioning of a legend can only be accomplished by
>> using the XYOUTS function where x and y represent coordinates corresponding to
>> the x and y axis of the plot. In my sistuation I have a 2D graph whose axis can
>> vary significantly depending on choices made in the program. Therefore by using
>> the XYOUTS function my words often can end up on top of each other or not even
>> on the plot itself.
>>
>> Is there anyway of making the positioning of the legend independent of the x
>> and
>> y axis of the plot ??
>
> Cc'd to jepear@essex.ac.uk
>
> Sure. XYOUTS can position data anywhere (even off the drawing area as I
> have inadvertently found out on several occasions). The key is to use
> device coordinates rather than plot coordinates for positioning. The
> !X.S and !Y.S variables return the normalized coordinates of the
> scaling factors used in positioning the plot frame. The upper right
> coordinate of the plot frame can be determined with the following
> commands:
>
> xoff = !D.X_VSize * (!X.S(0) + !X.S(1) * !X.CRange(1))
> yoff = !D.Y_VSize * (!Y.S(0) + !Y.S(1) * !Y.CRange(1))
> xyouts, xoff, yoff, /device, 'Legend'
>
You can also use normalized coordinates with XYOUTS
xyouts, .8, .8, /normal, 'Legend'
____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
|
|
|
|
|
|