I have data1
, whose first column is, in fact, the date (i.e. number of days from 1900/1/1). I then create a 3D plot as below:-
data1 = {{42219, 33, 71}, {42218, 35, 72}, {42217, 36, 72.5}, {42216, 36.5, 73}};
ListPointPlot3D[data1]
As you can see, 42216 and 42219 etc. are shown on the axis label. But I want to show the date yyyy/mm/dd instead. Thus I tried to convert data1's first column into the date format:-
data1[[All, 1]] = DateObject[{1900, 1, 1}] + data1[[All, 1]]*Quantity[1, "Days"];
data1
ListPointPlot3D[data1]
I am successful to convert the format but failed to create the plot. I obtained this error as output:-
Last::nolast: {} has zero length and no last element.
How can I show the date format in the axis? Many thanks!
Ticks
so trytickspecs1 = Map[{#, DateObject[{1900, 1, 1}] + #*Quantity[1, "Days"]} &, data1[[All, 1]] ];
thenListPointPlot3D[data1, Ticks -> {tickspecs1, Automatic, Automatic}]
although a date string format would look better. $\endgroup$Map[{#, DateString[ DateObject[{1900, 1, 1}] + #*Quantity[1, "Days"], {"Year", "/", "Month", "/", "Day"}]} &, data1[[All, 1]] ]
instead. $\endgroup$