I have a dataset that I want to plot them in R. I know there are many packages such as ploty or some other 3D plots. My problem is that my dataset includes 5 different types, for example 5 different cars and I want to compare the speed and power of each of types in 5 different classes. So in total there are 10 columns (excluding the first column of classes) but I would like to have 5 charts, each one with 2 dimensions. It looks like below in which for each of a,b,c,d,e, the column with index 1 is speed and the column with index 2 is power and the chart plots for different classes; therefore, a1 is speed of a and a2 is power of 2. There are five classes and two variables for each of 5 types of cars:
The result after command dput is below so you can use data:
structure(list(X = structure(1:5, .Label = c("class1", "class2",
"class3", "class4", "class5"), class = "factor"), a1 = c(489.4,
505.8, 525.8, 550.2, 576.6), a2 = c(197.8, 301, 389.8, 502, 571.2
), b1 = c(546.8, 552.6, 558.4, 566.4, 575), b2 = c(287.2, 305.8,
305.2, 334.4, 348.6), c1 = c(599.6, 611.4, 623.6, 658, 657.4),
c2 = c(318.8, 423.2, 510.8, 662.4, 656), d1 = c(616, 606.8,
600.2, 595.6, 595), d2 = c(242.4, 292.8, 329.2, 378, 397.2
), e1 = c(582.4, 580, 579, 579, 579), e2 = c(214, 255.4,
281.8, 303.8, 353.8)), .Names = c("X", "a1", "a2", "b1",
"b2", "c1", "c2", "d1", "d2", "e1", "e2"), class = "data.frame", row.names
= c(NA,-5L))
So I want one for example blue for a1, one blue for a2 (it can be a plane) and one grean for b1 and one green for b2, even bubble or other types might be useful. I think it would be nice to have a plane for 1 and 2 in y and z axis and classes in x axis. Class is a categorical variable. How can I format it and by what tools I can have what I need? P.S: Actually, I have 5 groups and for each group, 2 charts. I want to combine them into 5 different 3D chart.