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

Home » Public Forums » archive » IDLgrImage image plot problem
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: IDLgrImage image plot problem [message #50388 is a reply to message #50303] Tue, 26 September 2006 17:55 Go to previous messageGo to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Tue, 26 Sep 2006 12:06:32 -0700, yy wrote:

> Hi there,
> I want to plot a 2D data set by using object graphics.
> And I want it to be colored. If I use direct graphics plot,
> it can be done as the following:
> WINDOW, 0, XSIZE=300, YSIZE=300
> LOADCT,13
> IMAGE_AX, 2ddata
>
> However, when I try to use IDLgrImage, nothing appears
> on screen. I don't know if it's because I didn't position the
> image correctly. But if it is, I still don't know how to find the
> image. Below is what I did:
> oWindow = OBJ_NEW('IDLgrWindow', DIMENSIONS=[300,300])
> oView = OBJ_NEW('IDLgrView')
> oModel = OBJ_NEW('IDLgrModel')
>
> ; Load color table 13
> oPalette = OBJ_NEW('IDLgrPalette')
> oPalette -> LoadCT, 13
> oImage = OBJ_NEW('IDLgrImage', 2ddata, PALETTE = oPalette)
>
> oModel -> Add, oImage
> oView -> Add, oModel
> oWindow -> Draw, oView
>
> Thanks a lot!
> -Jingyi

You are drawing an image into an IDLgrView with default dimensions of
[-1:1, -1:1]. So, you are probably only seeing the lower-left pixel of
your image, blown up to 1/4 of the entire window.

Try

oView->SetProperty, VIEWPLANE_RECT = [0,0,300,300]

Karl
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Dereferencing a large array in a structure
Next Topic: Like SPLINE but does not go through all points

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

Current Time: Sun Oct 12 16:32:13 PDT 2025

Total time taken to generate the page: 0.00232 seconds