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 #51657 is a reply to message #51656] Fri, 01 December 2006 06:22 Go to previous message
Laurens is currently offline  Laurens
Messages: 41
Registered: May 2006
Member
Laurens wrote:
> First of all; jezus, what **** is spamming this usefull newsgroup ??
>
> Second, after my post about getting IDLgrPlot to work, the tips of david
> and his example did get it to work as it should be, though thinking in
> viewplane terms takes a bright moment ;)
> Now the viewplane is going [-0.15, -0.15, 1.22, 1.22] while the scaling
> with davids Normalize function just uses [0,0,1,1].
> So, for the plot and the axisses, 0,0,1,1 is used, while the bigger
> viewplane is needed for the axes to correctly be viewed, right?
>
> Ok all done so far; tiny little problem now is that when the data is
> scaled in a bit huge way (i guess), the text on the axes isn't readable
> anymore; it just squeezes it up...
> see http://sophorus.mine.nu/idlgrplot_axis.jpg for an example of what I
> mean. Appearantly, some part of the scaling process isn't going well I
> guess?
>
> With kind dutch regards :)
>
> Laurens
Actually, i was asking this in order to figure out something else which
i thought was the best way to proove the fact that there is in fact some
effort put into it :) but since it might be just faster to ask directly
(and of course would put even more value in this newsgroup ;)) lets try
it directly:

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

scaledX = mean(event.x) ;what scaling to use?
scaledY = mean(event.y)

self.xLine->SetProperty, Color=[255,0,0], Thick=1, DATA=[[scaledX, 0,
0], [scaledX, 100, 0]]

self.yLine->SetProperty, Color=[255,0,0], Thick=1, DATA=[[0, scaledY,
0], [100, scaledY, 0]]

self->Draw
--------------------------------------------

I assume i'm just not thinking the right way (one again :)), someone
that could point me in the right way?

Thnx in advance...again ;)

Laurens
[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: Sat Oct 11 01:40:36 PDT 2025

Total time taken to generate the page: 0.00793 seconds