Ploting ocean surface temp and salinity

Hello,
I am trying to plot ocean surface temperature and salinity (secondary "y" axis) together with latitude, however salinity values are very high and temperature very low, the graph look like this


I have tried several kinds of transformations, but no one works, and when I tried log transformation the inverse function "exp" gave me an error
I am using the following code
ggplot(data = dat282, aes(x = Lat)) +
geom_point(aes(y = TSS, colour = "Temperatura (ºC)"), shape = 15, size = 2) +
geom_point(aes(y = SSS, colour = "Salinidade"), shape = 17, size =2) +
scale_y_continuous(sec.axis = sec_axis(~exp(SSS), name = ""))
Error in f(...) : object 'SSS' not found

Does any one knows which will be the better transformation or how to sort the Error?
Thanks!

Temperature and salinity are different quantities, with different units. They don't belong on the common scale. I suggest you plot them in two separate panels, one above the over, with the same latitude axis. If you want to see the relation between temperature and salinity, plot one versus another.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.