1
$\begingroup$

Let's say I have two variables (smoking and lung cancer) that I'm trying to plot on a time series graph.

My data for smoking looks like this: 1990/1991 66,000 people smoked, 1991/1992 75,000 people smoked, 1992/1993 86,00 people smoked

and so on

My data for lung cancer is: 1990 55 000 people developed lung cancer, 1991 80 000 people developed lung cancer, 1992 90 567 people developed lung cancer

and so on

Note: The number of people given in this example is made up. The actual figures were converted to a percentage.

Now, my question is how do I plot the years on the x-axis when one has two years like in smoking and one has only one year like for lung cancer?

Does my scale go like this 1990/1991, 1991/1992, 1992/1993, etc and then use this scale to plot both data points? So I'll use the 1990/1991 to plot both the smoking and lung cancer values (which have been converted to a percentage).

I seriously hope I made sense in what I was trying to say.

$\endgroup$
2
  • $\begingroup$ What do the slashes in "1990/1991" etc. mean? $\endgroup$
    – whuber
    Nov 20 '19 at 15:39
  • 1
    $\begingroup$ @whuber the slash means between. I was able to get the answer. So every data I had belonged to the first year, not the second one. So my scale for the x-axis was 1990, 1991, 1992, etc not 1990/1991, 1992/1993, 1994/1995 etc $\endgroup$
    – Cece
    Nov 23 '19 at 4:16
1
$\begingroup$

What about combining two plots like this? You can also use percentages instead of the actual number of people. I could share with you the source code (in R) if you wish.

$\endgroup$
2
  • 1
    $\begingroup$ Thank you so much for responding to my post. I completely forgot to come back and edit it by mentioning that I got the answer. I feel so bad that you had to do all of this work. Please accept my apology. Data management is killing me, and has caused serious side effects to every aspect of my life. Any way, what I did was I combined my data for both smoking and lung cancer and I plotted them on the y-axis. As for my x-axis, I wrote 1990, 1991, 1992, 1993 etc. $\endgroup$
    – Cece
    Nov 23 '19 at 4:23
  • $\begingroup$ No problem! Glad you solved it! $\endgroup$ Nov 23 '19 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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