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

Home » Public Forums » archive » Re: How to smooth lines in plots
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
Re: How to smooth lines in plots [message #32873] Sat, 16 November 2002 09:48
Kolbjorn Bekkelund is currently offline  Kolbjorn Bekkelund
Messages: 20
Registered: August 2002
Junior Member
David Fanning wrote:

> Kolbjorn Bekkelund (kobe@rocketrange.no) writes:
>
>> I have a xy plot where the curve is very "rough" due to variations in the
>> x-value. To ease the view of this plot I would like to smoothen it a bit.
>> To describe the problem a bit more: Look at it as a line with some
>> modulation in it, and I only want to see the shape of the curve and not
>> all the small deviations.
>>
>> The plot is being made from a 2D array. Are there any ways of smooting
>> like this?
>
> I think this might be a job for the SMOOTH function.
> If your data is really noisy, you might have to apply
> the function multiple times.
>
> I can't tell from your description exactly how the
> plot is being made, but you may want to smooth each
> row (or column) or your 2D array individually. For
> example:
>
> Plot, Smooth(array[3,*], 7, /Edge_Truncate)
>
> Cheers,
>
> David
>

Thanks David.
That did it !

Kolbjorn
--
Kolbjorn Bekkelund,
Systems Engineer, ALOMAR Observatory
Andoya Rocket Range
Email: kobe@rocketrange.no
http://alomar.rocketrange.no
Arctic Linux: http://arctic-linux.tnett.no

*******************************************************
"If I have been able to see further,
it was only because I stood on the shoulders of giants"
--
Sir Isaac Newton
*******************************************************
Re: How to smooth lines in plots [message #32874 is a reply to message #32873] Sat, 16 November 2002 07:28 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kolbjorn Bekkelund (kobe@rocketrange.no) writes:

> I have a xy plot where the curve is very "rough" due to variations in the
> x-value. To ease the view of this plot I would like to smoothen it a bit.
> To describe the problem a bit more: Look at it as a line with some
> modulation in it, and I only want to see the shape of the curve and not all
> the small deviations.
>
> The plot is being made from a 2D array. Are there any ways of smooting like
> this?

I think this might be a job for the SMOOTH function.
If your data is really noisy, you might have to apply
the function multiple times.

I can't tell from your description exactly how the
plot is being made, but you may want to smooth each
row (or column) or your 2D array individually. For
example:

Plot, Smooth(array[3,*], 7, /Edge_Truncate)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to smooth lines in plots
Next Topic: Re: mpeg viewers

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

Current Time: Sat Oct 11 12:24:49 PDT 2025

Total time taken to generate the page: 0.06740 seconds