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 #36971 is a reply to message #36969] Tue, 11 November 2003 15:51 Go to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"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
> ---------------------------------------------------------
>
[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: Fri Oct 17 21:23:16 PDT 2025

Total time taken to generate the page: 0.47872 seconds