comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Add diagonal 1:1 line in a plot?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Add diagonal 1:1 line in a plot? [message #53920] Tue, 08 May 2007 07:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mike writes:

>> OPlot, [-5, 10], [-5, 10]
>
> Be careful with this - the slope of the line depends on the plot range
> and aspect ratio and the ratios of those to the arguments to oplot.
> I've found that using
>
>> oplot, !x.crange, !x.crange
>
> more often produces correct plots.

I had to do an Internet search to see what he meant
by a 1:1 line, but it seemed to me that the actual
slope didn't matter in this case. It was the ratio
that was important.

But, in any case, it would probably be smart to
have a plot that had a 1:1 aspect ratio, if only so you
don't confuse the casual reader of your paper.
You could always use my ASPECT program for this
purpose:

PLOT, data, POSITION=Aspect(1.0)

You can find ASPECT here:

http://www.dfanning.com/programs/aspect.pro

Of course, you can have aspect ratios be whatever
you want them to be:

Plot, data, POSITION=Aspect(2.0/3.0)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: regular expressions (parsing strings)
Next Topic: Re: Object Graphics Code Generator

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:10:59 PDT 2025

Total time taken to generate the page: 0.00629 seconds