[R] Thinking about using two y-scales on your plot?
jim at bitwrit.com.au
Thu Apr 3 12:55:13 CEST 2008
Allen S. Rout wrote:
> I've got a series of graphs I generate in R to illustrate backup
> activity. These are scaled, primarily, in bytes. But different
> activities have different costs per byte, and I augment the bytes
> scale with dollars.
> So the blue series corresponds to tbe blue dollars scale (and bytes)
> and the green and red points correspond to the green scale (and
> Am I being naughty?
If misleading someone is naughty, I guess we've all done that...
The difficulty you have is the visual impression that the storage
charges are higher than the transfer charges. You are trying to squeeze
three dimensions (daily amount of information, daily cost of transfer
and daily cost of storage) into two. Because the values are actually
plotted against the first dimension and the cost scales are tacked on to
that, only in the case where both of the latter dimensions coincide
would the visual metric correspond to the numbers. Then you wouldn't
have a problem, of course. I would tend to make the visual comparison on
the money dimension and add supplementary axes showing the amount of
information for each aspect of the cost. Here's a rough example:
# estimate the first two weeks of data
# roughly calculate dollars per day
pch=2,log="y",main="Cost of backups",ylab="Dollars/day",xlab="Date",
More information about the R-help