Announcement

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

  • How to plot wages by country , but for each country plot overlaid men and women wages?

    Suppose I want to plot wages of women and men by country. How can I do that?
    female and male wages are two separate variables. For each country I want female and male wages to be drawn overlaid. Then graphs of all countries be combined. I'm aware of command graph by and also combine and also subsetplot but non of these serves my purpose at least each separately.
    There are around 9 countries so the by command is easier than specifying each countries' name but I'm fine if that's the only solution. Some thing like the attached picture.
    Thanks.
    Attached Files
    Last edited by John Williamss; 06 Aug 2022, 03:23.

  • #2
    Something like line malewages femalewages year, by(country) should work. But don't use red and green together, as many people struggle to distinguish them.

    Comment


    • #3
      Originally posted by Nick Cox View Post
      Something like line malewages femalewages year, by(country) should work. But don't use red and green together, as many people struggle to distinguish them.
      Thanks. Works perfectly.

      Comment


      • #4
        Originally posted by Nick Cox View Post
        Something like line malewages femalewages year, by(country) should work. But don't use red and green together, as many people struggle to distinguish them.
        One more question. Is it possible to have two yaxis for each of the graphs? (something like what we do with yaxis(2) in a twoway graph).

        Comment

        Working...
        X