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

Home » Public Forums » archive » Re: oplot in Object Graphics
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: oplot in Object Graphics [message #36969 is a reply to message #36963] Wed, 12 November 2003 01:13 Go to previous messageGo to previous message
Miguel ?ngel C?rdoba is currently offline  Miguel ?ngel C?rdoba
Messages: 7
Registered: February 2003
Junior Member
Thank you Karl,
It works, but I execute this function when the user moves the mouse over one
image and It's very slow. Do you know another faster method?. It's
indispensable
to create one object 'IDLgrPlot' in the for statement?

Thank you!.


Karl Schultz wrote:

> "Miguel Angel Cordoba" <cordoba@grahi.upc.es> wrote in message
> news:3FB0EEF7.8040005@grahi.upc.es...
>
>
>> Hi,
>> I'm migrating my applitations to Object Graphics and I don't
>> know how to make an oplot.
>>
>> In direct graphics I execute:
>> PLOT,x,y,xrange=[xmin,xmax],yrange=[ymin,ymax], xstyle=1,ystyle=1,
>>
>>
> $
>
>
>>
>>
> xtitle='Xtitle',ytitle='Ytitle',/Nodata,charsize=siz_ch,colo r=44,XMARGIN=5.,
>
>
>> $
>> YMARGIN=3.,FONT=1
>>
>> FOR,i=0,n-1 BEGIN
>> FOR,j=0,n-1 BEGIN
>> OPLOT,x(i,j),y,color=44
>> ENDFOR
>> ENDFOR
>>
>> OPLOT,x(n,n),y,color=70,thick=2
>>
>> Then in Object Graphics:
>>
>> oView = obj_new('IDLgrView')
>> oModel = obj_new('IDLgrModel')
>> oPlot = obj_new('IDLgrPlot',x,y,xrange=[xmin,xmax],yrange=[xmin,ymax ])
>> oPlot->GetProperty, XRANGE = xr, YRANGE = yr
>> xc = norm_coord(xr)
>> yc = norm_coord(yr)
>> xc[0] = xc[0] - 0.5
>> yc[0] = yc[0] - 0.5
>> oPlot->SetProperty, XCOORD_CONV = xc, YCOORD_CONV = yc
>>
>> oXTitle = obj_new('IDLgrText', 'X Title')
>> oYTitle = obj_new('IDLgrText', 'Y Title')
>> ; Axes
>> oXAxis0 = obj_new('IDLgrAxis', 0, RANGE = xr, LOCATION = [xr[0],
>> yr[0]], $
>> XCOORD_CONV = xc, YCOORD_CONV = yc, TITLE = oXTitle, $
>> COLOR = [255,0,0], /EXACT)
>> oYAxis0 = obj_new('IDLgrAxis', 1, RANGE = yr, LOCATION = [xr[0],
>> yr[0]], $
>> XCOORD_CONV = xc, YCOORD_CONV = yc, TITLE = oYTitle, $
>> COLOR = [0,0,255], /EXACT)
>>
>> ; construct the hierarchy
>> oModel->Add, oXAxis0
>> oModel->Add, oYAxis0
>> oModel->Add, oPlot
>> oView->Add, oModel
>>
>>
>>
>
>
> You would add something like:
>
> FOR,i=0,n-1 BEGIN
> FOR,j=0,n-1 BEGIN
> oModel->Add,
> OBJ_NEW('IDLgrPlot',x(i,j),y,color=[44,0,0])
> ENDFOR
> ENDFOR
>
> oModel->Add, OBJ_NEW('IDLgrPlot', x(n,n),y,color=[70,0,0],thick=2)
>
>
>
>
>> ; create the destination
>> sWinfo.wDrawPVR->DRAW,oView
>>
>> Then how can I don't the oplot?
>> Can you help me?
>>
>> Thanks a lot!.
>>
>> --
>> ---------------------------------------------------------
>> Miguel Angel Cordoba
>>
>> Grup de Recerca Aplicada en Hidrometeorologia (GRAHi-UPC)
>> http://www.grahi.upc.es
>> ---------------------------------------------------------
>>
>>
>>
>
>
>
>

--
---------------------------------------------------------
Miguel Angel Cordoba mailto:cordoba@grahi.upc.es
TEL. 93 4017371
http://campus.uab.es/~2034008

Grup de Recerca Aplicada en Hidrometeorologia (GRAHi-UPC)
http://www.grahi.upc.es
---------------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Matrix multiplication
Next Topic: Operator Precedence Tutorial

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

Current Time: Tue Oct 21 05:58:33 PDT 2025

Total time taken to generate the page: 1.20471 seconds