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

Home » Public Forums » archive » Re: Clipping IDLgrPolyLine objects?
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: Clipping IDLgrPolyLine objects? [message #13838] Thu, 17 December 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Darran Edmundson (dEdmundson@Bigfoot.com) writes:

> I've created my own Plot2D object that contains axes and
> any number of line plots. The user sets the axes range
> via a keyword parameter. Plots are then added via an
> object method, e.g.
>
> p = Obj_New('Plot2D', xrange=[0.0,50.0], yrange=[-0.5,0.5])
> x=findgen(100)
> p->addplot,x,sin(x)
>
> The problem is that the polyline object is not clipped to
> the box defined by the Plot2D range. If x spans a larger
> range (as it does above), the line crosses the boundary.
> While I can deal with clipping at the x endpoints easily
> enough, I can't think of a simple way to clip pieces of
> the polyline that go over the top or bottom. Is there
> a simple method of clipping polylines?

The simplest method is to add the lines with the OPLOT
command after the plot axes have been created. I've
never known it to NOT clip. How does your AddPlot method
work?

Cheers,

David

Oh, wait a minute. Is this being done in OBJECT
graphics? Humm. Still can't imagine it happening
if the polyline object is scaled correctly. Need
more info, I guess. :-(

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Previous Topic: Re: using octal codes for special characters
Next Topic: polar plot

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

Current Time: Wed Oct 08 18:32:38 PDT 2025

Total time taken to generate the page: 0.00174 seconds