How to efficiently present graph for this data I have three variables. In the first table CPU value is fixed and similarly in the second. If I generate a graph for this data there will be four different graphs and then another four graphs if memory value is kept fixed and compared with CPU and approaches. Is there an efficient way to represent this data with less graphs generated?




Memory
Approach1
Approach2
CPU




10
3.1
2.2
10


20
2.1
2.1
10


30
3.1
1.1
10


40
1.1
2.1
10







Memory
Approach1
Approach2
CPU




10
3.1
2.2
20


20
2.1
2.1
20


30
3.1
1.1
20


40
1.1
2.1
20







Memory
Approach1
Approach2
CPU




10
3.1
2.2
30


20
2.1
2.1
30


30
3.1
1.1
30


40
1.1
2.1
30



 A: Since there are two factors (memory and CPU) with fixed levels, you can probably use a simple faceted graphic like the one shown below, which relies on the R statistical package. Conditional or trellis displays are also available in Stata, SAS JMP, or Python, and the idea can be ported to Mathematica or Gnuplot, or whatever software you like.
This way, you have all the information in three separate panels, which share the same coordinate axes (especially on the y-axis, if values happen to be more variable than the ones you presented in your table). This is the clearest display that I can think of: As noted by Nick Cox, using a single panel display would mean messing up the information and having a hard time with the key or caption.
library(ggplot2)
d <- data.frame(memory = rep(seq(10, 40, by = 10), 3), 
                CPU = rep(c(10, 20, 30), each = 4), 
                approach1 = rep(c(3.1,2.1, 3.1, 1.1), 3), 
                approach2 = rep(c(2.2, 2.1, 1.1, 2.1), 3))
dm <- reshape2::melt(d, measure.vars = 3:4)
p <- ggplot(data = dm, aes(x = memory, y = value, color = variable))
p + geom_line(aes(group = variable)) + facet_grid(~ CPU) + theme_bw()


