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

Home » Public Forums » archive » Data points off plot when limit xrange
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
Data points off plot when limit xrange [message #84312] Wed, 15 May 2013 07:12 Go to next message
morganlsilverman is currently offline  morganlsilverman
Messages: 46
Registered: February 2013
Member
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
Re: Data points off plot when limit xrange [message #84729 is a reply to message #84312] Wed, 15 May 2013 07:31 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
I think you're looking for the NOCLIP keyword...

plots, ..., NOCLIP=0

http://www.exelisvis.com/docs/graphkeyw.html#graphkeyw_32887 78166_370050
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Data points off plot when limit xrange
Next Topic: graphical issue after removing all tabs from a widget_tab

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

Current Time: Wed Oct 08 13:49:25 PDT 2025

Total time taken to generate the page: 0.00432 seconds