how to create a second x axis with different intervals?
Afficher commentaires plus anciens
Hiya! I've been looking at similar questions but haven't been able to make the code work myself. I'm trying to make a scatter plot for examining fluxes with depth, where the y axis is depth, one x axis is lipid fluxes and the second x axis is carbon flux. I need the two x axes to have a different interval range. I've managed to get the first x axis but for some reason the second won't show up. This is the code I have so far:
scatter(fame1,depth1,'^')
set(gca, 'YLim',[-750 -100])
ax= gca;
ax1= ax;
ax2= ax;
ax2.XAxisLocation= 'bottom';
set(ax1, 'XAxisLocation', 'top')
set(ax1,'XTick',([0:0.25:3]));
set(ax2, 'XAxisLocation', 'bottom')
set(ax2,'XTick',([0:5:25]));

How can I get the second x axis on the bottom to show up?? Any help would be appreciated!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Distribution 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!
