Announcement

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

  • Plotting multiple time-series with some conditions

    Hi everyone,

    I have to do a graphic time series for one of our studies. It's the first time I've worked with time series, so I'm totally inexperienced with this type of data and graphics.

    Also, the scale on the x-axis is far too large and too detailed. My data runs from 1 July 2021 to 31 July 2023, but the scale extends to January 2024.
    I've also noticed that the hours/minutes/seconds are not correct. I should have rounded times, like 00:00:00, 01:00:00 and so on.

    I've been asked to build 3 subfigures, in one column, in this way:

    (1) The first must contain only data from July 2021 to December 2021 (Q3-Q4).
    (2) The second must contain the whole of 2022.
    (3) The third must contain the year 2023, up to 31 July 2023.

    These three subfigures must meet two conditions: they must contain the same variables as those in the graph enclosed and they must be on the same scale on the y-axis, for a better comparison.
    The colours of each subfigure must change, and I don't know how to change colours, please.
    The dates in the enclosed graph are not correct, obviously. Furthermore, they should be rounded as 00:00:00, 01:00:00, and so on.
    Could anyone help me please?

    Here is a dataex:

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input double(Date MaxPriceMWh CompetitivePriceMWh RealPrice)
    1.9407168e+12 110.079 109.819  91.99
    1.9407204e+12 110.079 109.819  91.26
     1.940724e+12 110.079 109.819  91.65
    1.9407276e+12 110.079 109.819  91.99
    1.9407312e+12 110.079 109.819  91.99
    1.9407348e+12 110.579 110.479  92.34
    1.9407384e+12 110.579 110.579  95.95
     1.940742e+12 110.579 110.579  98.19
    1.9407456e+12 110.579 110.259   96.4
    1.9407492e+12 110.079 110.039  94.93
    Best,

    Michael


    P.S: The graph below as been created thanks to this post: https://www.statalist.org/forums/forum/general-stata-discussion/general/1355560-plotting-multiple-time-series#post1355560
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	223.0 KB
ID:	1732579

    Last edited by Michael Duarte Goncalves; 03 Nov 2023, 09:39.
Working...
X