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.
I need your help. I'd like to make a graph that's easy to read and pleasing, not like the one below.
Could you please give me some insights and help me please?
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.
Here is a dataex:
Here is my code:
Thanks.
Best,
Michael
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.
I need your help. I'd like to make a graph that's easy to read and pleasing, not like the one below.
Could you please give me some insights and help me please?
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.
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 end format %tc Date
Code:
twoway (line MaxPriceMWh Date, lc(blue%90)) /// (line CompetitivePriceMWh Date, lc(red%60)) /// (line RealPrice Date, lc(black%30)) , /// legend(label(1 "Strategic Prices") label(2 "Competitive Prices") label(3 "Real Prices")) /// title("Electricity Prices") /// subtitle("From July 2021 to July 2023") /// xtitle("Date") ytitle("MW/h", orient(horizontal)) /// plotregion(margin(none))
Thanks.
Best,
Michael