How to set x axis in a plot?

5 vues (au cours des 30 derniers jours)
Fabian Moreno
Fabian Moreno le 28 Nov 2021
Commenté : Fabian Moreno le 28 Nov 2021
Hello, I would like to know if is possible to set the X- axis like the plot that I loaded. I make the x-axis in pain just as an example of what I would like to do.

Réponse acceptée

Chunru
Chunru le 28 Nov 2021
Modifié(e) : Chunru le 28 Nov 2021
subplot(6,1,1:5); imagesc([1 8], [14, 22], randi(100,100));
subplot(8,1,8);
imagesc([1 8], 1, [1 2 2 2 2 2 2 3 3]);
set(gca, 'XTick', [], 'YTick', [])
text(4, 1, 'G3');
  1 commentaire
Fabian Moreno
Fabian Moreno le 28 Nov 2021
Thank you!

Connectez-vous pour commenter.

Plus de réponses (1)

Image Analyst
Image Analyst le 28 Nov 2021
rgbImage = imread('peppers.png');
imshow(flipud(rgbImage), 'XData', 1:8, 'YData', 14:22);
axis('on', 'xy')

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by