datetime adjustment in x-axis plot
Hello everyone,
i want to adjust my datetime x-axis in pcolor plot in matlab but i tried but it doesnt working. I add my data here and code also
x = [01-01-2021 00:00 01-01-2021 00:14 01-01-2021 00:28 01-02-2021 00:42] like this one year data for 14 min intervel
y = [10.23 11.16 12.19 13.31 14.54 15.88 17.35 18.96 20.72 22.66 24.77 27.1 29.65 32.45 35.53 38.92 42.65 46.77 51.32]
z = [2.27E+03 3.94E+03 4.48E+03 6.26E+03 3.18E+03 3.78E+03 5.37E+03 5.60E+03 6.35E+03 8.47E+03 1.05E+04 1.05E+04
1.36E+04 1.12E+04 8.48E+03 3.96E+03 5.84E+03 4.55E+03 3.65E+03 6.17E+03 7.48E+03 6.98E+03 9.84E+03 1.11E+04
5.72E+04 6.90E+04 5.64E+04 4.71E+04 1.94E+04 6.37E+03 6.59E+03 6.89E+03 8.81E+03 9.70E+03 8.11E+03 9.59E+03
1.26E+04 1.34E+04 1.69E+04 1.99E+04 2.18E+04 2.62E+04 2.98E+04 9.09E+03 5.16E+03 8.73E+03 3.96E+03 4.95E+03
5.16E+03 4.06E+03 4.24E+03 6.17E+03 7.99E+03 8.20E+03 6.68E+03 1.07E+04 1.24E+04 1.36E+04 1.78E+04 1.89E+04]
Code:1
pcolor(datenum(x),y,z)
shading interp
a = gca;
set(a,’XTick’);
datetick(‘x’,’dd-mmm HH:MM’,’keepticks’,’keeplimits’); # tried this it is showing only few date points
(or)
datetick(‘x’,’dd-mmm HH:MM’,’keepticks’); # tried this it is also showing only few date points
Code:2
pcolor(datenum(date1),y,z)
a = gca;
a.XTick = datenum(x);
a.XTickLabel = datestr(datenum(x)); # in this code it is taking as a text and displaying all the points
I just want to show in my x-axis like Jan, Feb, Mar, till Dec or daily one point or 10 days once one point like Jan 10 Jan 20 Jan 30 Feb 10 etc.
I tried alot but i couldnt able to make this i am waiting for the help from the experts.
Thank you in advance.Hello everyone,
i want to adjust my datetime x-axis in pcolor plot in matlab but i tried but it doesnt working. I add my data here and code also
x = [01-01-2021 00:00 01-01-2021 00:14 01-01-2021 00:28 01-02-2021 00:42] like this one year data for 14 min intervel
y = [10.23 11.16 12.19 13.31 14.54 15.88 17.35 18.96 20.72 22.66 24.77 27.1 29.65 32.45 35.53 38.92 42.65 46.77 51.32]
z = [2.27E+03 3.94E+03 4.48E+03 6.26E+03 3.18E+03 3.78E+03 5.37E+03 5.60E+03 6.35E+03 8.47E+03 1.05E+04 1.05E+04
1.36E+04 1.12E+04 8.48E+03 3.96E+03 5.84E+03 4.55E+03 3.65E+03 6.17E+03 7.48E+03 6.98E+03 9.84E+03 1.11E+04
5.72E+04 6.90E+04 5.64E+04 4.71E+04 1.94E+04 6.37E+03 6.59E+03 6.89E+03 8.81E+03 9.70E+03 8.11E+03 9.59E+03
1.26E+04 1.34E+04 1.69E+04 1.99E+04 2.18E+04 2.62E+04 2.98E+04 9.09E+03 5.16E+03 8.73E+03 3.96E+03 4.95E+03
5.16E+03 4.06E+03 4.24E+03 6.17E+03 7.99E+03 8.20E+03 6.68E+03 1.07E+04 1.24E+04 1.36E+04 1.78E+04 1.89E+04]
Code:1
pcolor(datenum(x),y,z)
shading interp
a = gca;
set(a,’XTick’);
datetick(‘x’,’dd-mmm HH:MM’,’keepticks’,’keeplimits’); # tried this it is showing only few date points
(or)
datetick(‘x’,’dd-mmm HH:MM’,’keepticks’); # tried this it is also showing only few date points
Code:2
pcolor(datenum(date1),y,z)
a = gca;
a.XTick = datenum(x);
a.XTickLabel = datestr(datenum(x)); # in this code it is taking as a text and displaying all the points
I just want to show in my x-axis like Jan, Feb, Mar, till Dec or daily one point or 10 days once one point like Jan 10 Jan 20 Jan 30 Feb 10 etc.
I tried alot but i couldnt able to make this i am waiting for the help from the experts.
Thank you in advance. Hello everyone,
i want to adjust my datetime x-axis in pcolor plot in matlab but i tried but it doesnt working. I add my data here and code also
x = [01-01-2021 00:00 01-01-2021 00:14 01-01-2021 00:28 01-02-2021 00:42] like this one year data for 14 min intervel
y = [10.23 11.16 12.19 13.31 14.54 15.88 17.35 18.96 20.72 22.66 24.77 27.1 29.65 32.45 35.53 38.92 42.65 46.77 51.32]
z = [2.27E+03 3.94E+03 4.48E+03 6.26E+03 3.18E+03 3.78E+03 5.37E+03 5.60E+03 6.35E+03 8.47E+03 1.05E+04 1.05E+04
1.36E+04 1.12E+04 8.48E+03 3.96E+03 5.84E+03 4.55E+03 3.65E+03 6.17E+03 7.48E+03 6.98E+03 9.84E+03 1.11E+04
5.72E+04 6.90E+04 5.64E+04 4.71E+04 1.94E+04 6.37E+03 6.59E+03 6.89E+03 8.81E+03 9.70E+03 8.11E+03 9.59E+03
1.26E+04 1.34E+04 1.69E+04 1.99E+04 2.18E+04 2.62E+04 2.98E+04 9.09E+03 5.16E+03 8.73E+03 3.96E+03 4.95E+03
5.16E+03 4.06E+03 4.24E+03 6.17E+03 7.99E+03 8.20E+03 6.68E+03 1.07E+04 1.24E+04 1.36E+04 1.78E+04 1.89E+04]
Code:1
pcolor(datenum(x),y,z)
shading interp
a = gca;
set(a,’XTick’);
datetick(‘x’,’dd-mmm HH:MM’,’keepticks’,’keeplimits’); # tried this it is showing only few date points
(or)
datetick(‘x’,’dd-mmm HH:MM’,’keepticks’); # tried this it is also showing only few date points
Code:2
pcolor(datenum(date1),y,z)
a = gca;
a.XTick = datenum(x);
a.XTickLabel = datestr(datenum(x)); # in this code it is taking as a text and displaying all the points
I just want to show in my x-axis like Jan, Feb, Mar, till Dec or daily one point or 10 days once one point like Jan 10 Jan 20 Jan 30 Feb 10 etc.
I tried alot but i couldnt able to make this i am waiting for the help from the experts.
Thank you in advance. matlab, matlab code, matlab coder MATLAB Answers — New Questions