Set new position for x label at semilogx diagram
Afficher commentaires plus anciens
- I have a semilogx diagram and I need to change the name and the position of the x labels as shown in the two pictures attached below.My data are pairs of values. *
X_values=> Tr=[0;2;5;10;25;50;100;200;500];
Y_values1=> SSa=[0.377;0.4050;0.422;0.44;0.452;0.461;0.469;0.478];
Y_values1=> SSb=[0.378;0.421;0.451;0.488;0.514;0.539;0.562;0.59];
Y_values1=> SSc=[0.348;0.384;0.41;0.439;0.46;0.478;0.495;0.515];
- and my code *
figure('Name','ExtremeValues','NumberTitle','off')
semilogx(Tr,SSa,'g*-')
hold all
semilogx(Tr,SSb,'b*-')
semilogx(Tr,SSc,'r*-')
set(gca,'linewidth',1.5,'fontsize',11);
xlabel('ReturnPeriod','FontSize',12,'FontWeight','bold')
ylabel('StormSurge (m)','FontSize',12,'FontWeight','bold')
set(gca,'XTickLabel',sprintf('%3.4f|',Tr))
grid on
Réponses (1)
Thorsten
le 26 Jan 2015
semilogx(Tr(2:end),SSa,'g*-')
hold on
semilogx(Tr(2:end),SSb,'b*-')
semilogx(Tr(2:end),SSc,'r*-')
set(gca, 'XTick', [2 5 10 25 50 100 200 500])
grid on
set(gca, 'XMinorTick', 'off')
set(gca, 'XMinorGrid', 'off')
Catégories
En savoir plus sur Scatter Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!