I have data which for every point takes values ranging from 2000 to -2000.
Normally, the trivial fix is simply plotting the log of the data. However, here I have both positive and negative values, and I'm not sure how to scale the data.
For example, I have data that looks like:
x = c(5 ,-2, -3, -10, -15, -2000)
Simply plotting using boxplot(x) yields an unscaled, difficult to read boxplot:
I found this answer, which lets me relabel the axis to what I want, but doesn't actually incorporate the data to plot it. What I'm looking for is something like:
labels=expression(1, -1, -10, -100, -1000)
boxplot(boxplot(c(10,10,10,10,-1,-1.5,-3,-1), yaxt="n"))
As you can see, the axis are labeled by fold (e.g. 10, 1, -1, -10, -100). However, in order to actually plot something, I cant use those labels, as all I did was rename the labels. All the other alternatives I've seen (e.g. This one, or this one) simply add log="y" to the plot argument, which doesn't work for my negative data.
Basically, I can't figure out how to coerce R into plotting with axis labels like 10, 1, -1, -10, -100 and being able to plot points with that same numerical value.