Ploting with axes exactly
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello, i am making a continuous plot. On X-Axis, every point is a day. On the code i am doing that X value is today, today+1, today+2, etc.
axes(handles.axes4);
tD25(j) = floor(now+j);%quitar el +...
init=length(tD25)-9;
if (init<1)
init=1;
end
set(gcf,'color','white');
drawnow;
plot(tD25(init:end),handles.concentracionPM25diaria(init:end),'-kd','linewidth',1.8)
title('Concentración de PM2,5 diaria');
xlabel('Tiempo (Día/Mes)');
ylabel('Concentración (µg/m3)');
axis manual;
datetick('x','DD mm');%cambiar a DD/mm
grid on;
j=j+1;
The problem is that the plot shows something like that:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161698/image.jpeg)
And i would like that for every day/month appears on the axe. I mean i would like in axe appears 01/2, 02/2, 03/2, 04/2 ...
If I don't put the month it appear correct:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161701/image.jpeg)
Any idea? Thank you.
댓글 수: 0
채택된 답변
추가 답변 (1개)
Ilham Hardy
2014년 4월 25일
What if your,
datetick('x','DD mm');%cambiar a DD/mm
changed to,
datetick('x',19);%cambiar a DD/mm
Hope it helps,
댓글 수: 0
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!