How were these two plots created?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292959/image.png)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292960/image.jpeg)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292961/image.jpeg)
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.
0 Commenti
Risposta accettata
Star Strider
il 14 Mag 2020
8 Commenti
Star Strider
il 14 Mag 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.)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Distribution Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!