Announcement

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

  • Plot graphs in multiple windows

    Hey,

    I have some accounting data for companies, matched into 58 industry codes. I want to plot graphs by industry codes. But all of them are plotted in the same window making it invisible.

    Is there a way in which I can distribute the graphs over 2-3 windows?


    Code:
    line ind_median_worseoff_firms ind_median_betteroff_firms ind_median_all_firms year if year>2000, by(code) xline(2017)

    Thanks

  • #2
    If I understood right, you may create a group variable, say, with 3 categories, then you use "by" group variable for the graphs. Another option is the - graph combine - command.
    Best regards,

    Marcos

    Comment


    • #3
      Hey Marcos,

      I have 56 groups (NIC codes). If I plot the graph by industry code, I get one graph which contains 56 small screens which are invisible. I want to make groups of probably 9 screens on one window and plot 6 such windows. -graph combine- causes the same problem as I was facing earlier

      Comment


      • #4
        Just to clarify my suggestion:I didn't recommend to use all the NIC codes in a single graph (after all, that is the "problem" stated in #1).

        Quite on the contrary, I suggested to create a group variable.

        For example, if you wish 4 windows and we have 40 NIC codes, the "newly-created" categories could be, say, ranges from 1 to 10.

        You may also use the "if" clause for that matter, followed by - graph combine - as also recommended.
        Last edited by Marcos Almeida; 18 Feb 2019, 04:38.
        Best regards,

        Marcos

        Comment


        • #5
          It's still unclear what you're expecting or hoping to plot. You have 3 response variables


          Code:
           
           ind_median_worseoff_firms ind_median_betteroff_firms ind_median_all_firms
          and a year variable and 58 or 56 codes. (If you wait long enough, perhaps more codes will disappear.) That's 174 or 168 time series.

          You could, for example, plot each response in a separate graph with separate lines for each code, but you would need to give up on identifying them all. A legend with 58 or 56 identifiers is not going to work: it will take up too much of the available space and you won't be able to think up 58 or 56 different colours that will work. You could replace each symbol with an identifier, but that's going to be a mess.

          We can help with syntax but you need to have a graphical idea that will work.

          Comment


          • #6
            Thanks for the advice Nick. Sorry for implying a reduction in number of codes. It is just a typo and not depreciation. :P You are absolutely right, I will think of a better way of representing.

            Thanks

            Comment

            Working...
            X