Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to plot two time-series on a same graph. One series takes much larger values than the other, so I thought a semilog scale might be appropriate (i.e. linear X (dates) and log Y). However, both series take on negative and positive values. Does it still make sense to use a log scale? If so, should I transform both series as follows?

    if observation > 0
        log_observation = log(observation)
    elseif observation < 0
        log_observation = -log(-observation)
        log_observation = 0
share|improve this question
Because whether and how to transform data depends on their characteristics (more than their signs!) and on the purpose of the transformation, please give us more information about both so that this can be an objectively answerable question. – whuber Nov 24 '12 at 17:03
The time-series are the returns in dollar vs. percent terms of a trading strategy over time. – lodhb Nov 25 '12 at 10:58
Why don't you show them as-is, using two different vertical axes to put the two series on the same graph? – whuber Nov 25 '12 at 16:31
So linear with two different y-axes? That is a good suggestion, I'll try it out. The only downside is that you don't have a single axis to compare both time-series on, but at least the graph will show correlation quite well. – lodhb Nov 25 '12 at 21:46

you might want to use a different transformation. The inverse hyerperbolic sine transform would seem to be a good first choice here.

share|improve this answer
Another choice is the cube root. – Peter Flom Nov 24 '12 at 15:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.