Effacer les filtres
Effacer les filtres

How to modify subplots to create a new subplots?

5 vues (au cours des 30 derniers jours)
Mibang
Mibang le 10 Avr 2024
Commenté : Mibang le 11 Avr 2024
I have two figures as attached. Each figure has 3x1 subplots.
open pvc4.fig
open pac4.fig
  1. In pac4.fig, how to make the TickLabels of the first two figures the same, i.e., either make it as "N, V, n/a" or "A, N, V, n/a" consistently?
  2. In pac4.fig, how to remove the thrid plot and make the figure having only two first subplots? So, I want to make it only two subplots.
  3. I want to take first two subplots of pac4.fig and take the first two subplots of pvc4.fig. So, I want to put those 4 subplots in one figure (4x4 subplots) together. The first two subplots of pac4.fig go the left side and the first two subplots of pvc4.fig go the right side of the figure.
Thank you very much,

Réponse acceptée

Matt J
Matt J le 10 Avr 2024
Modifié(e) : Matt J le 11 Avr 2024
close all
H(1)=openfig('pac4.fig'); ax1=flip(findobj(H(1),'Type','axes'));
H(2)=openfig('pvc4.fig'); ax2=flip(findobj(H(2),'Type','axes'));
ax=[ax1(1:2);ax2(1:2)];
xt=[0.125,0.375,0.625,0.875];
xtl={'n/a','V','N','A'};
figure;
t=tiledlayout(2,2);
ax(1).Parent=t;
ax(1).Layout.Tile=1;
ax(2).Parent=t;
ax(2).Layout.Tile=3;
ax(3).Parent=t;
ax(3).Layout.Tile=2;
ax(4).Parent=t;
ax(4).Layout.Tile=4;
close(H);
for i=1:4, colorbar(ax(i),'off'); end
h=colorbar('Ticks',xt,'TickLabels',xtl); h.Layout.Tile='east';
  12 commentaires
Matt J
Matt J le 11 Avr 2024
Modifié(e) : Matt J le 11 Avr 2024
  1. I haven't done anything to change the line colors. That was what was in the .fig files.
  2. I fixed it, but you have an additional line in your data somewhere that is black.
Mibang
Mibang le 11 Avr 2024
Right, I think this is not possible unless I plot again with the original data with careful plan for colors.
Thank you very much for your effort and time.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Object Properties 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