- Set the yticks to 0:50
- Set the yticklabels to (0:50).^2
- Take the sqrt of your data before plotting it
How to create axis with perfect square ticks
2 次查看(过去 30 天)
显示 更早的评论
What should I do to plot my data along a y axis such as this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/505503/image.png)
0 个评论
采纳的回答
Rik
2021-1-31
The answer from @Mara provides all the tools you need, but there are still some caveats. Note that the first option will not set the spacing and the second option will cause a mismatch between the values and the labels.
I think the best solution would be to do all of these things:
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!