Hi all,
 
I try to represent a multiple curve graphic where the x-axis is the
temperature and the different y-axes are the different X (X22,X43,X44...)
some X corresponds to the same molecule (22 and 44 are for CO2 for instance)
so I use the same colour for them.
 
I wanna mix the linetype with the colour to be able to visually see the
difference between X43 and X45
The best I have done up to now is this code but it crashes with :"Error in
col2rgb(colour, TRUE) : invalid color name 'AA'"
 
if I skip the linetype in geom it works perfectly of course
 
 
THT_N2_ATGMS_plot<-ggplot(THT_N2_ATGMS,aes(x=Temp)) +
 
# geom_line(aes(y=X22,colour="CO2")) +
# geom_line(aes(y=X44,colour="CO2")) +
 
 geom_line(aes(y=X43,colour="AA",linetype="43")) +
 geom_line(aes(y=X45,colour="AA",linetype="45")) 
 
 
 
data set looks like:
         Temp      X22      X43      X44      X45      X48      X58      X60
1    25.97650 4.62e-12 6.14e-11 3.93e-10 1.29e-11 2.05e-10 6.78e-12 9.31e-12
2    26.57025 4.73e-12 6.11e-11 3.91e-10 1.28e-11 2.05e-10 6.80e-12 9.43e-12
3    27.16400 4.62e-12 6.04e-11 3.91e-10 1.27e-11 2.05e-10 6.87e-12 9.28e-12
4    27.75650 4.57e-12 6.06e-11 3.90e-10 1.27e-11 2.03e-10 6.79e-12 9.26e-12
5    28.34892 4.64e-12 6.01e-11 3.89e-10 1.28e-11 2.03e-10 6.75e-12 9.18e-12
6    28.94142 4.71e-12 6.01e-11 3.88e-10 1.27e-11 2.02e-10 6.67e-12 9.24e-12
7    29.53125 4.70e-12 5.93e-11 3.87e-10 1.27e-11 2.02e-10 6.65e-12 9.20e-12
8    30.12233 4.64e-12 5.91e-11 3.86e-10 1.26e-11 2.01e-10 6.63e-12 9.11e-12
9    30.71483 4.71e-12 5.91e-11 3.85e-10 1.25e-11 2.01e-10 6.59e-12 9.17e-12
10   31.30983 4.51e-12 5.88e-11 3.85e-10 1.23e-11 2.00e-10 6.54e-12 9.00e-12
11   31.90233 4.52e-12 5.80e-11 3.85e-10 1.23e-11 1.99e-10 6.60e-12 9.09e-12
12   32.49475 4.47e-12 5.80e-11 3.83e-10 1.24e-11 1.99e-10 6.57e-12 8.95e-12
13   33.08458 4.58e-12 5.79e-11 3.83e-10 1.23e-11 1.98e-10 6.57e-12 9.02e-12
14   33.67575 4.56e-12 5.75e-11 3.82e-10 1.22e-11 1.97e-10 6.43e-12 8.89e-12
15   34.26558 4.53e-12 5.74e-11 3.80e-10 1.23e-11 1.97e-10 6.42e-12 8.97e-12
16   34.85933 4.54e-12 5.70e-11 3.80e-10 1.22e-11 1.96e-10 6.48e-12 8.93e-12
17   35.45183 4.55e-12 5.67e-11 3.79e-10 1.21e-11 1.96e-10 6.38e-12 8.86e-12
18   36.04683 4.54e-12 5.66e-11 3.78e-10 1.20e-11 1.95e-10 6.37e-12 8.90e-12
19   36.63933 4.53e-12 5.61e-11 3.77e-10 1.19e-11 1.94e-10 6.45e-12 8.85e-12
20   37.23042 4.50e-12 5.57e-11 3.77e-10 1.21e-11 1.94e-10 6.35e-12 8.82e-12
21   37.82417 4.55e-12 5.58e-11 3.76e-10 1.19e-11 1.94e-10 6.29e-12 8.86e-12
22   38.41400 4.57e-12 5.57e-11 3.75e-10 1.20e-11 1.92e-10 6.30e-12 8.80e-12

 

Regards/Cordialement

-------------
Benoit Boulinguiez
Ph.D student
Ecole de Chimie de Rennes (ENSCR) Bureau 1.20 
Equipe CIP UMR CNRS 6226 "Sciences Chimiques de Rennes"
Avenue du Général Leclerc 
CS 50837 
35708 Rennes CEDEX 7 
Tel 33 (0)2 23 23 80 83
Fax 33 (0)2 23 23 81 20
 <http://www.ensc-rennes.fr/> http://www.ensc-rennes.fr/ 

 

	[[alternative HTML version deleted]]


