How to change both the axis value ranges
Mostra commenti meno recenti
Hi everyone,
I have plotted this for my mobile users distribution but i don't know how to change the axis on this figure now as i want them to correspond to distance, like instead of -1 to 1 they should read as 0 to 250 km on both the axes.

Risposta accettata
Più risposte (1)
Sean de Wolski
il 16 Giu 2014
Modificato: Sean de Wolski
il 16 Giu 2014
Set the 'XTick' and 'XTickLabel' manually
sphere
set(gca,'XTick',linspace(-1,1,6))
set(gca,'XTickLabel',cellstr(strcat(num2str((0:50:250).'),' km')))
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!