Surely there is a simple solution but I cannot figure it out...
I am trying to plot 2 dependent variables on the sample ggplot plot, grouped by temperature.
I can plot them both separately but not together.
I basically want to plot two concentrations of calcium (from differing equations) depending on 4 constant temperatures and pressure.
FYI: Tc = temperature (colour group), PCO2 = pressure (x axis), Calcium1: concentration using eq 1, Calcium2: concentration using eq 2
My attempted code looks like this:
(ggplot(data=DCa)
- aes(x="PCO2", y="Calcium1", color="Tc")+ geom_line(aes(group="Tc"))
- aes(x="PCO2", y="Calcium2", color="Tc")
- geom_line(aes(group="Tc"))
- ylim(0.0, 2.0)
- labs(x="PCO$2$ (atm)", y="[Ca$^{2+}$]${app}$ (mmol/L)", color='T $\degree$C') )
The output is only showing "Calcium2" results. ggplot output
Does anyone know how to show both concentration groups?