How to add non-numerical axis values in 3D scatter plots?

3 次查看(过去 30 天)
I am using a 3D scatter plot option. Can the x-axis values be labeled as "1:1, 2:1, 5:1, 8:1, 10:1" as peak area ratios? Currently, I added dummy numbers but the true labels should be the ratios as written. This is Matlab 2019a. Thanks.
This the syntax
scatter3(x,y,z,56, '^', 'r', 'MarkerFaceColor','r') % 56 is the marker size

采纳的回答

dpb
dpb 2019-9-22
lbls=num2str([1 2 5 8 10].','%d:1'); % build char array of desired tick labels
xticklabels(lbls) % and write 'em...
Tick labels are 1:1 to ticks so just make the same number of labels as have ticks.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by