Plot continuous line when have missing data points [message #83359] |
Thu, 28 February 2013 13:34  |
morganlsilverman
Messages: 46 Registered: February 2013
|
Member |
|
|
Hello,
I'm trying to plot temperature profiles and am having a hard time because I have gaps of temperature data at certain altitudes. For example...
alt = [1833.68, NaN, 2443.28] and temp = [298.150, NaN, 291.650]. Because I'm trying to see the vertical profile I still want a solid line between these points even though there's a gap of data. I will see the gap by where the symbols are. Is there a way to do this or do I have to create a new array with continuous data points to get a line plotted? I've searched to see if anyone else has already asked this question but it seems like people want to leave gaps in the data their plotting if I'm reading the posts correctly.
Thanks for your help.
-Morgan
|
|
|
Re: Plot continuous line when have missing data points [message #83425 is a reply to message #83359] |
Fri, 01 March 2013 07:12  |
tackmeister
Messages: 5 Registered: March 2013
|
Junior Member |
|
|
Op donderdag 28 februari 2013 22:34:49 UTC+1 schreef morganls...@gmail.com het volgende:
> Hello,
>
>
>
> I'm trying to plot temperature profiles and am having a hard time because I have gaps of temperature data at certain altitudes. For example...
>
> alt = [1833.68, NaN, 2443.28] and temp = [298.150, NaN, 291.650]. Because I'm trying to see the vertical profile I still want a solid line between these points even though there's a gap of data. I will see the gap by where the symbols are. Is there a way to do this or do I have to create a new array with continuous data points to get a line plotted? I've searched to see if anyone else has already asked this question but it seems like people want to leave gaps in the data their plotting if I'm reading the posts correctly.
>
>
>
> Thanks for your help.
>
> -Morgan
I think creating a new array would be the easiest way. What I would do is fit a line or other function to the data (linfit,gaussfit,mpfitfun,...) and then plot the fitted data as a line, and only plot the symbols of the original data on top of it using /overplot.
|
|
|