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

Home » Public Forums » archive » oplot in Object Graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
oplot in Object Graphics [message #36976] Tue, 11 November 2003 06:15
Miguel ?ngel C?rdoba is currently offline  Miguel ?ngel C?rdoba
Messages: 7
Registered: February 2003
Junior Member
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
---------------------------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Simultaneous Equation Solution (Homogeneous system)
Next Topic: Re: using convert_coord with multiple plotting windows

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

Current Time: Sat Oct 11 00:51:40 PDT 2025

Total time taken to generate the page: 0.31992 seconds