I have a matlab figure, where the X and Y vectors are as below:
X = [4 8 16 32 64 128 256 512 1024];
Y = [1 1.5 2 2.5 3 3 4 4 5];
plot(X, Y, 'b-p','LineWidth',1.0);hold on %
The figure is shown as following:
My concern, can I shown the X_label with specific values, for example I want the X label to be similar to X, which is [4 8 16 32 64 128 256 512 1024]
; similar to the below example:
When using the function xticks
or xticklabels
, that becomes as below:
However, what I wants is to have equal distance as the figure shown before.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.