Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Graph with two different scales

    Hello,

    so this time I have a graph with two Y-axis scales. But the second scale seems very small. As shown down. I can't use rescale. Do you have any suggestions?

    Thank you very much in advance a lot!!



    Click image for larger version

Name:	Screenshot 2016-09-02 23.03.03.png
Views:	1
Size:	90.4 KB
ID:	1355304



    twoway line flowUE unempr year, sort clpattern(1 shortdash) ///
    clcolor(black black) ///
    legend(row(2) col(1) pos(11) order(1 "Job Finding Rate (UE)" 2 "Unemployment Rate") ///
    ring(0) size(medsmall) region(lc(white)) ) graphregion(color(white)) ///
    yaxis(1 2) ytitle(Annual Transition Rate) ///
    ylabel(0(0.05)0.5, nogrid angle(horizontal)) xscale(titlegap(3)) ///
    xtitle(Years) ylabel(, axis(2) angle(horizontal)) ///
    ylabel(0 "0" 0.02 "0.02" 0.04 "0.04" 0.06 "0.06" 0.08 "0.08", axis(2)) ///
    ytitle(Fraction of Labor Force, axis(2)) ///
    scale(0(0.02)0.15,axis(2))
    yscale(titlegap(3) axis(2)) yscale(titlegap(3) axis(1)) ///
    title(Figure 5)

  • #2
    Post your data as recommended in the FAQ and suggestions of exactly what to do and how to do it are more likely. But note that many authorities argue that if two variables are in the same units of measurement then showing them as they are is the only honest graph. (That doesn't exclude nonlinear scales, in my view.)

    (As I understand it, the variables are not in the same units of measurement. Unemployment is a point measurement and job finding rate is some kind of flux. I am not an economist, modulo A-level Economics Grade A 1969.)
    Last edited by Nick Cox; 03 Sep 2016, 03:55.

    Comment


    • #3
      Oh, I tried but dataex didn't show much like it showed only the same numbers for example for the unemployment rate I have:
      .0846653
      .0846653
      .0846653
      .0846653
      .0846653

      So thats unemployment rate scale should be above by about 0.10. Whereas the first y-Axis can stay by 0.5 as transition rates are higher in general. So what I want to do is having two graphs (which both evolve over time) together but that works only partially as you see above.... I dont know why but the axis(2) stops at the beginning of the scale and does not go up... Now I tried to use rescale but that didnt work too.

      Comment


      • #4
        All I want is data like that you used for the graph. I have faked similar data and have a different suggestion for your graph.

        Code:
        clear
        set scheme s1color 
        set obs 23 
        gen year = 1990 + _n 
        set seed 2803
        version 10: gen unempr = 0.05 + 0.01 * rnormal() 
        version 10: gen flowUE = 0.36 + 0.02 * rnormal() 
        label var u "Unemployment Rate" 
        label var f "Job Finding Rate (UE)" 
        
        renvars  u f \ whatever2 whatever1 
        reshape long whatever, i(year) j(which) 
        
        label def which 2 "Unemployment Rate" 1 "Job Finding Rate (UE)" 
        label val which which 
        
        line whatever year, by(which, col(1) yrescale note("")) ///
        ytitle("") xtitle("")  xla(1991(2)2013) subtitle(, pos(9) bcolor(none) nobexpand place(e))
        Click image for larger version

Name:	twopanel.png
Views:	1
Size:	14.5 KB
ID:	1355351



        Otherwise if you want two series to be superimposed just multiply the smaller by a factor about 10 and make sure that the axis labels tell the truth.

        Comment

        Working...
        X