Conditional plotting for a dataset?
Mostrar comentarios más antiguos
I would like to make a plot of data where the date is on the x-axis and air concentrations values are in the y-axis. But, I only want to plot the air concentrations that are greater than 0.07. How would I do this?
Thank you.
5 comentarios
Osama Hussein
el 13 de Nov. de 2017
Let's store air concentrations in vector "c".. Then
plot(data(c>0.07),c(c>0.07))
Walter Roberson
el 13 de Nov. de 2017
This will join across the gaps.
Osama Hussein
el 13 de Nov. de 2017
Yes, you are correct. Thank you.
Navonil Sarkar
el 2 de Mzo. de 2021
Editada: Navonil Sarkar
el 2 de Mzo. de 2021
I want to plot x (independent variable) vs y only for integral values of x in a discrete function! How can this be done?
Walter Roberson
el 2 de Mzo. de 2021
temp = x;
temp(mod(temp, 1)~=0) = nan;
plot(temp, y)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!