The data to be visualized is from an experiment (T1-T8 represents different sections of the brain) and is as follows:
[[Block1]]
sum
[T1,] 6
[T2,] 6
[T3,] 4
[T4,] 5
[T5,] 8
[T6,] 9
[T7,] 8
[T8,] 6
[[Block2]]
sum
[T1,] 3
[T2,] 3
[T3,] 4
[T4,] 5
[T5,] 4
[T6,] 2
[T7,] 1
[T8,] 5
[[Block3]]
sum
[T1,] 3
[T2,] 3
[T3,] 4
[T4,] 2
[T5,] 4
[T6,] 8
[T7,] 3
[T8,] 1
[[Block4]]
sum
[T1,] 6
[T2,] 5
[T3,] 4
[T4,] 3
[T5,] 9
[T6,] 8
[T7,] 2
[T8,] 6
[[Block5]]
sum
[T1,] 8
[T2,] 3
[T3,] 4
[T4,] 5
[T5,] 7
[T6,] 6
[T7,] 2
[T8,] 2
[[Block6]]
sum
[T1,] 10
[T2,] 9
[T3,] 6
[T4,] 8
[T5,] 9
[T6,] 4
[T7,] 6
[T8,] 7
and so on.. For more than 100 blocks..
I would like to visualize the data in the following way to see the overall value in each region for very block..
For one block I get a line plot as shown below:
But it is tedious to visualize the same for 100 blocks.. What would be the best method to view it as a single plot using R..I tried doing it with heat maps but I would rather visualize them as a graph..
In the end it should be something like ( I have a rough figure of it).. Iam not sure how to do this in R for several blocks in a single plot or some other better way to visualize it:
Here is an alternative that matches more or less the desired result. I guess that the scale is unimportant given the large number of blocks to be visualized.
This is basically what
ggplot2
is for, in my opinion. Here is a recreation of your data, along with a very basic plot.You can get really fancy with colours and layout, but you can use that as something to get you started if you don't know
ggplot2
.Here is what a heat map of the same data would look like
Here an alternative using
lattice xyplot
. The data example are realistic a matrix (100x8). I tried to remove the strip to optimize plot region. I think the result is only useful to get a global idea or main trend of the data.