I've come up with a graph (a scatterplot) of the log(1+inf)
(inf = number of people infected with a given disease on the y-axis against one of the explanatory variables, in this case, the populational density (pop./km²; x-axis) on my model. The log transformation was used merely for visualization, because it spreads the distribution of the data and allows for more aesthetically appealing plots. Basically, what I want is both axis to show the value of that same variable before the log transformation. The dots need to be plotted like plot(log(1+inf),log(populational_density)
, but the number on the axis should refer to plot(inf,populational_density)
. I've provided a picture of my graph with some manual editing on the y-axis to show you the idea of what I want.
- The numbers in red would be the 'inf' values equivalent to log(inf);
Please, bear in mind that those values in red do not correspond to reality.
I understand the whole concept of y = f(x), but i've been asked to provide it. Is this possible? I'm using the ggplot2
package for plotting.