How can I generate this plot?
Show older comments
Hi,
I am trying to generate similar looking plots to the one attached. With this, do you know what kind of plot this is? And how to get the black bars showing where the orifice opening is?

12 Comments
Adam Danz
on 6 Feb 2020
The heat map can be created with imagesc().
It looks like there may be small arrows along a grid. That can be done with quiver().
The black lines are easy to plot with the plot() or line() functions.
The colorbar can be added with colorbar().
Check out the documentation for each of those functions for examples to get you started.
Monique Embury
on 6 Feb 2020
Adam Danz
on 6 Feb 2020
Sure thing. If you get stuck, show us the code you've got and explain where you're stuck. I'd be happy to help as needed.
Monique Embury
on 25 Feb 2020
Adam Danz
on 25 Feb 2020
Hi Monique,
How can I help with the imagesc implementation? It's not clear where you're stuck.
Perhaps running your code could help me out and speed up the process but first I need the inputs and necessary files. Could you save the inputs and files in zip file and attach it?
Alternatively, perhaps the problem you're having can be reduced to a simpler example.
Monique Embury
on 25 Feb 2020
Adam Danz
on 25 Feb 2020
Is that what your input variables look like? Vectors (not matricies)? The image you shared contains quiver arrows along a grid and usually gridded data are matrices. Sometimes they can be vectors, too, but it's important to describe your variable correctly so I want to make sure your data are indeed vectors. If they are vectors, do they have repeated values (again, as a grid would)?
Monique Embury
on 25 Feb 2020
Edited: Monique Embury
on 25 Feb 2020
I'm guessing the 1st and 2nd cols are the x and y vals and the 3rd and 4th cols are the u and v value and I am to ignore the 5th col. Correct? Or is the 5th column the heatmap values?
output_avg(1:10,:)
ans =
232 2016 NaN NaN 0
248 2016 0.20987 0.24137 21
264 2016 0.31538 0.47129 25
280 2016 0.95483 0.66786 18
296 2016 0.56917 1.5054 20
312 2016 0.54912 0.77364 18
328 2016 0.5497 1.1534 17
344 2016 0.59935 1.1871 34
360 2016 0.90434 1.3109 46
376 2016 0.58487 0.78972 53
Monique Embury
on 25 Feb 2020
Adam Danz
on 25 Feb 2020
What defines the color mapping? Another way of asking that, what defines the colobar scale?
Is it the magnitude of the quiver vectors? What defines positive and negatve values? If pos & neg values are defined by the direciton of the quiver vectors, which directions define pos and neg?
Monique Embury
on 25 Feb 2020
Accepted Answer
More Answers (0)
Categories
Find more on Data Distribution Plots 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!
