Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi
I want to plot numbers from a table along with a function. But - if I select for example Row 2 and Class C, I want NaN to appear, i.e no value at all in the plot. Is it possible to incorporate NaN in a table? Or is NaN not applicable in this case? How can I solve this?
Worksheet attached (prime 7).
Thanks in advance!
If a trace consists of more than one point and at least one of them is not a NaN, Prime would silently ignore this point. Unfortunately this behaviour changes when the plot consists of one single point only as in your case.
Furthermore the value you get from the Excel sheet is not Primes NaN but rather the string "NaN" and strings cannot be plotted as well.
A possible workaround can be to replace a "NaN" for a value outside the plot range. This requires you to manually set the plot range. In the example below I had chosen the value -1 to be replaced for "NaN" and have set manually the lower limits for both axis to zero.
You may also use 'infinity' (ctrl z) as replacement value and limit the upper axis limits manually.
Attached worksheet is P10, but you can see all necessary changes in the picture.
How and where would you expect something that is "not a number" to appear in the plot? What would you be trying to present to the reader?
Would this kind of thing be suitable? I've created a vector that transforms the NaNs into their interpolated position on the x&y coordinates, and shown them as a separate trace to indicate that they represent missing values from the Number values. This is intended to show where they would appear if mapped onto your x,y function, but it doesn't necessarily represent where they would have appeared in the column data if they weren't NaNs.
If it isn't what you want, could you sketch out what you would prefer and post an image/photo of it?
Stuart