Running an error when attempting to set gca YTick marks.
Show older comments
I have the following code:
set(gca,'YTick',energy_pixel);
However, I'm running an error that says:
Error using matlab.graphics.axis.Axes/set
Value must be a vector of type single or double whose values increase
But my energy_pixel variable is of type double and is either remaining the same or increasing:
energy_pixel = [0, 0, 0, 0, 71, 188, 595, 996]
Is there anyway to allow these numbers to be added to YTick? I can't change the values and I was wondering if there was a way I can work around the error itself.
Accepted Answer
More Answers (0)
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!