How to replace xtick labels on histogram plots properly?

조회 수: 1 (최근 30일)
Yasmin Samy
Yasmin Samy 2018년 4월 6일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by