plotyy not displaying both y datasets when one contains nans

1 view (last 30 days)
I have 2 y datasets each 1 x 96 that share an x axis that is also 1 x 96. the one data set is similar to (1, 2, 3, 4, ...) and is just numbers the other contains NaNs and is more like (NaN, NaN, NaN, 1, ...) it actually originally only had 8 values and was expanded with filler NaNs at appropriate places (as both datasets are time series of temperatures sharing an x-axis of times, but one dataset had fewer points initially)
each plots separately with plot(x,y1) and plot(x,y2) so I know there are no issues with the data plotting or anything else. The same 1x96 x-axis is used in both of these plots
when I try plotyy(x,y1,x,y2) only the graph of the y dataset that does not contain NaNs displays, although both appropriate, separate colored y-axes are shown.
does plotyy not correctly ignore NaNs the way plot does? is there something else I can type besides NaN? When I try to fill the NaNs with 0s the second curve displays, although obviously not as I desire it since it then includes 0s.

Answers (0)

Categories

Find more on Two y-axis in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!