change datatype of x axes
Show older comments
Hi, i made a GUI where i can plot some data. I can plot my data over numeric values (runtime of my experiment) or datetime values (date of my experiment).
So i can switch between these two modes: Datetime and Runtime
My Problem: when i plotted my data over Datetime and then switch to runtime and want to plot my data i get the following error:
Error using Sondenvergleich_CA_FA>ButtonPreview_Callback (line 280)
Values plotted against x-axis must be datetime values. To create datetime values, use the DATETIME function.
So it seems like my x-axis expects some datetime values but in runtime mode i give numeric values to my axis.
how can i get my xaxis to show numeric values again?
Accepted Answer
More Answers (1)
Ranzige Erdnuss
on 5 Aug 2020
for me
cla(app.UIAxes,'reset')
made it possible to plot double values after I plotted some datetime values. After this command you must reset the axis labels again via:
xlabel(app.UIAxes, 'X Label')
ylabel(app.UIAxes, 'Y Label')
Categories
Find more on Graphics Objects 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!