Clear Filters
Clear Filters

How were these two plots created?

5 views (last 30 days)
Korbi
Korbi on 14 May 2020
Commented: Star Strider on 14 May 2020
I've got two plots from scientific papers that I can't seem to recreate. I would apprechiate if someone could tell me which plot command was used.
The first one is a color-coded representation of values in a matrix (or at least I assume it is), where the number that is represented is also visible in the image.
I've tried playing around with the imagesc() and the pcolor() commands, but none of them allowed me to display the numeric value represented by the color.
My second enigmatic plot is the result of a 2D Fourier transformation:
I'm pretty sure it was created via imagesc(), but I'd like to know how the axis midpoint was moved into the center of the image and how the axis cross was created.
When I try
iamgesc(imfftnorm);
colormap(jet)
ax = gca;
ax.XAxisLocation = 'origin';
ax.YAxisLocation = 'origin';
I get this instead:
Different shape aside (I think that's because I was only using a screenshot of his data for the Fourier transformation), I can't get the middle of the axes moved to the center of the image, and I don't know how that cross can be displayed.
If anyone has any idea about these two, I'd be very grateful.

Accepted Answer

Star Strider
Star Strider on 14 May 2020
The top plot image appears to be a heatmap.
The lower plot image is most likely a surf plot using the view function (specifically view(0,90)) to see it from the top.
That’s my best guess for the lower one, anyway.
  8 Comments
Korbi
Korbi on 14 May 2020
Hah, how did I not think of that? Sometimes the easiest answer is the best answer.
Thanks, I thought that maybe the original had used some setting to move the x- and y-axis to the middle of the screen.
Star Strider
Star Strider on 14 May 2020
As always, my pleasure!
I thought these:
ax = gca;
ax.XAxisLocation = 'origin';
ax.YAxisLocation = 'origin';
would work, however it may be necessary to add:
ax.ZAxisLocation = 'origin';
as well. (I didn’t consider that possibility, and I didn’t test it since creating them manually worked.)

Sign in to comment.

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!