Re: How to smooth lines in plots [message #32873] |
Sat, 16 November 2002 09:48 |
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  |
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
|
|
|