dataframe:- df
Period v1 v2
1 2002 1 1
2 2003 5 12
3 2004 9 28
4 2005 16 66
5 2006 23 115
Code:-
ggplot() + geom_line(data=df, aes(x=Period, y=v1, group=1, color="v1")) +
geom_line(data=df, aes(x=Period, y=v2, group=1, color="v2"))+ theme(legend.title=element_blank()) + scale_y_continuous(name="Count") +
geom_point(data=df, aes(x=Period, y=v1, group=1)) + geom_point(data=df, aes(x=Period, y=v2, group=1))
I am plotting two line graph along with points.The issue I am experiencing is that the values increase in different magnitude and so one of the line graphs "v1" gets condensed at the lower end of the scale and thus harder to read. can anyone please advice in solving this? Also can this code be shortened?