Hello,
I am plotting a 2D dataset using cgplot and cgplots. When I limit the xrange to [-150,150] I end up with data points plotted outside the axis bounds of my plot. I realize that I'm cutting off some of the data but my interest is in the data surrounding 0, not the outliers. How do I limit the xrange so that those outlier datapoint outside of the range not to plot outside of my axis? Thank you.
altrange = [0,2500]
ribrange = [-150,150]
cgplot, ribrange, altrange, /noerase, xstyle=1,ystyle=1,Position=[0.1,0.1,0.85,0.95], $
xrange=xrange, yrange=yrange, /nodata
for m=0,n_elements(Airport)-1 do begin
profile = Airport(m)
legendItem1 = Obj_New('cgLegendItem', Color=strtrim(colors(m),2), Location=[0.86, y], $
Title=flight(profile), /Hardware, Length=0.0)
cgoplot, Rib(profile,0:17), alt, /nodata, color=strtrim(colors(m),2), Legends=[legendItem1]
cgplots, Rib(profile,0:17), alt, psym=2, color=strtrim(colors(m),2)
Obj_Destroy, [legendItem1];, legendItem2, legendItem3]
y=y+0.03
endfor
Sincerely,
Morgan
|