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

Home » Public Forums » archive » Re: IDLgrPlot Axis scaling bug?
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: IDLgrPlot Axis scaling bug? [message #51654 is a reply to message #51653] Fri, 01 December 2006 06:32 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Laurens writes:

> in the above example, i want to follow the cursor with a red cross,
> visible by lines drawn all over the plot (one horizontal, one vertical).
> I managed to do this by adding two IDLgrPolyline objects to the model,
> I've already fetched any movement of the cursor, but somehow - and it
> makes me think it has to do with that resizing / scaling again - the
> positions of the lines don't match the position of the cursor :(
>
> Screenshot:
>
> http://sophorus.mine.nu/IDLgrPolyline.jpg
>
> Code:
>
> self.xLine = Obj_New('IDLgrPolyline')
> self.yLine = Obj_New('IDLgrPolyline')
> self.Model->Add, self.xLine
> self.Model->Add, self.yLine
> self.xAxis->GetProperty, CRange=xrange
> self.yAxis->GetProperty, CRange=yrange
>
> xs = Normalize(xrange)
> ys = Normalize(yrange)
>
> self.xLine->SetProperty, XCoord_Conv=xs
> self.yLine->SetProperty, YCoord_Conv=ys

Isn't this backwards? Don't you want this:

self.xLine->SetProperty, YCoord_Conv=ys
self.yLine->SetProperty, XCoord_Conv=xs

I'd probably scale both lines in BOTH directions. Why not?

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
Read Message
Read Message
Read Message
Previous Topic: IDLgrPlot Axis scaling bug?
Next Topic: format questions

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

Current Time: Fri Oct 10 11:16:38 PDT 2025

Total time taken to generate the page: 0.47952 seconds