I am new to R, and try to get a visual representation of a year collected temperature data from a server rack. The data is already prepared and loaded in the data
object in the R environment in this format:
> str(data)
'data.frame': 516496 obs. of 5 variables:
$ Day : POSIXct, format: "2017-06-29" "2017-06-29" "2017-06-29" "2017-06-29" ...
$ SecondsOfDay: int 0 60 120 180 240 300 360 420 480 540 ...
$ Temp : num 34.8 34.7 34.7 34.7 34.7 ...
The field Day
contains just the date, the field SecondsOfDay
is the second of the day, rounded to full minutes. The field Temp
contains the actual temperature value.
I would like to create a 3D plot of this data, where the X-axis is the date, and the Y-axis the time of the day. The Z-axis should be the temperature.
Ideally, I would like to use one of the basic functions like persp
to create a graph like this (but with correct Z values):
The core of my problem, why I could not find a own solution yet, is because the examples for the plot use a function and range sequences as input. I do not understand how to prepare the data from my table into the correct format for the plot functions.
What is a simple way to generate a plot as described above?
rgl
because it's not-proprietary. – jay.sf