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
; 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
---------------------------------------------------------
|