How to replace xtick labels on histogram plots properly?

2 views (last 30 days)
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

Answers (0)

Categories

Find more on Data Distribution Plots in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!