How to se x axis with specific range
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone i need some help setting my x axis. As you can see in the image below my maximum value is near 10^-9 and the minimum is 0. The proble is thar near the 0 value i have data with values of 10^-16 and 10^-13 and i want that data to be shown.
I would like to see my axis going from 0 to the next minimun value and then ever 10^-1 value.
An example of what i want is this. x-axis= 0 ,10^-16, 10^-15, 10^-14, 10^-13, 10^-12, 10^-1,1 10^-10, 10^-9,
figure(1)
plot(M12D(:,2),M12D(:,1))
ylim([0 4.5])
This is my code, I tried doing xticks but i cant achieve it. M12D is an 326x2 array.
Thanks in advance.

3 commentaires
Walter Roberson
le 8 Juin 2020
The above link suggests making the axis log scale, which would generally be a good idea in these kinds of cases.
However, log scale can have some unexpected consequences for values that are 0 or negative. In the case of 0, the edges connecting to 0 will not be drawn, and areas (such as fill() or patch() or surf()) that involve a 0 will not be drawn. Negative values can get a bit odd...
Réponses (0)
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!