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

Home » Public Forums » archive » Re: getting an IDLgrPlot drawn
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: getting an IDLgrPlot drawn [message #51484 is a reply to message #51483] Fri, 24 November 2006 07:12 Go to previous messageGo to previous message
Laurens is currently offline  Laurens
Messages: 41
Registered: May 2006
Member
I noticed :) Got a line from another ng-posting,

info.View->SetProperty, VIEWPLANE_RECT = [-0.1, -0.1, 1.2, 1.2]

which fixed a lot :)
I actually see a line being drawn and if that's not enough, I also see
an axis (though its ugly huge big, and just goes from 0 to 1 which
doesn't correspond to my data).

Without having looked at your xplot example the "normalizing" is done
through;

info.Plot->getProperty, XRANGE = xrange, YRANGE = yrange

info.Plot->setProperty, XCOORD_CONV = norm_coord(xrange)
info.Plot->setProperty, YCOORD_CONV = norm_coord(yrange)

I assume that's good enough? Will check your xplot example in a minute...

So Viewplane is not the actual pixels but just from 0.0 to
1.0....hmz...could make sense i guess...


GrtZ, Laurens

I'm so glad I was lucky...feels good to be lucky, though doesn't feel
good to be lucky and don't get nothing back for it hehe :)

David Fanning wrote:
> Laurens writes:
>
>> Now, when I execute this code, I don't get what I want. I get some
>> strange lines, of which you can view the result at
>> http://sophorus.mine.nu/idlgrplot_weird.jpg.
>
> Humm. Well, I think the problem is that you have a misunderstanding
> of what you are doing with the Viewplane rectangle. It seems
> to be you think this might be the size of the window used to
> view the plot. In fact, it is establishing the coordinate
> system you plan to use for viewing the plot. Two different
> things.
>
> When I first started with object graphics (and even now, come
> to think of it) I preferred to set up my coordinate system to
> go from 0 to 1 (what we refer to in direct graphics as a
> normalized coordinate system). I was familiar with that
> system, I knew how to lay things out in a window using
> that system, etc. But what that means is that all your data,
> then, has to be scaled so that it fits into that system.
> Since I did this over and over again, I simply wrote a small
> routine to do this for me, which I named NORMALIZE.
>
> You can see how I would construct a simple plot like you
> want in the program XPLOT, which you can find on my web
> page:
>
> http//www.dfanning.com/programs/xplot.pro
>
> Notice that I don't bother with a scene object. It is really
> not necessary unless you plan to have multiple plots in the
> same window.
>
> Cheers,
>
> David
>
> P.S. The weird lines in your output indicate a mismatch
> between the data in the plot and the coordinate system
> you have chosen. Most people don't see anything in this
> situation, so you are MUCH luckier than most! :-)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: getting an IDLgrPlot drawn
Next Topic: Re: PLOT and colors

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

Current Time: Sat Oct 11 07:15:06 PDT 2025

Total time taken to generate the page: 1.35837 seconds