How to replace xtick labels on histogram plots properly?

2 vues (au cours des 30 derniers jours)
Yasmin Samy
Yasmin Samy le 6 Avr 2018
Hello, So i am plotting a histogram of log values and i want the xaxis to show the corresponding linear values. edge_tl are the actually bin edges for the histogram (of log values - negatives) edge_test are the inverse of those values both are of a size 1 x 39
histo_totl=histogram(hist_values(:,5), edge_tl);
edge_test=10.^(edge_tl); %changed the bin (log values) to linear values to put them on xaxis
set(ax1,'XtickLabel',edge_test)
The problem is that the xaxis replaces the major ticks (which are four) with the first four values of the edge_test array instead of taking it as a whole to replace the edge_tl.
A second thing is i would like to show the edge_test values as powers of 10. Using Xscale, log at the moment isn`t working. Thank you

Réponses (0)

Catégories

En savoir plus sur Data Distribution Plots 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!

Translated by