Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 65570

twoway graph: adding vertical lines

$
0
0
Hello
I've got troubles with adding vertical lines in my twoway time series graph .
On my y-axis there is the average TV-audience of 184 Champions League games and on the x-axis there is my time variable in terms of a clock time for example 21:30. The format of my time variable is %tcHH:MM and it's a double.

When i type in my code as follows (because there are multiple overlaid line graphs)

twoway (tsline avgrating_90 if group==1 & tin(20:45:00,22:33:00)) || (tsline avgrating_90 if group==2 & tin(20:45:00, 22:30:00)) || (tsline avgrating_90 if group==3 & tin(20:45:00, 22:30:00)) || (tsline avgrating_90 if group==4 & tin(20:45:00, 22:30:00)), tline( 21:30 21:45)

(because my aim are two vertical lines, one at 21:30 and one at 21:45 )

It results an error called: "invalid line argument, 21:30 21:45"
It must be a problem with my clock time but I can't find out what it is because if I format my graph via graph editor and then want to add reference lines at a specific point in time I can't type in a double dot. Array



Help would be greatly appreciated
Kind regards
Elias

ps: There is suddenly a vertical line but in my stata graph there isn't one (probably because I transformed my stata graph into a PNG-file for attaching it here).

Viewing all articles
Browse latest Browse all 65570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>