Overlapping Datetick Xlabels when performing multiple plots
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm making a GUI that allows the user to select data to plot with an initially specified time interval. Multiple set of data can be selected and plotted with the help of the hold command, but now the only problem is the datetick xlabels...
It appears that everytime a plot is added to the axes the newly plotted datetick labels are placed in the correct location, while the previous set are moved up or down corresponding to how the previous data set appears after the new plot is added.
What I need is some kind of command to turn off/delete/make invisible the previously plotted datetick labels before the next plot is made.
Here's my code for the plots
hold (handles.axes1,'on')
plot(handles.axes1,XL,YL,'Color',handles.color(handles.PlotCount,:))
hold (handles.axes1,'off')
XData=linspace(handles.start,handles.end,15);
set(handles.axes1,'XTick',XData);
datetick('x',23,'keepticks');
rotateticklabel(handles.axes1,90);
xlim(handles.axes1,[handles.start handles.end]);
legend('-DynamicLegend')
I've tried different thing with the set command and nothing seems to be working...any help will be appreciated
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!