Hi,
I am working with a large panel (>80) of historical prices over a number of years.
I want to graph the panels over time. This is easy enough because I can use the xtline command and overlay the panels with a command like:
xtline price, overlay legend(order())
However as you can see from the attached photo I'm not gaining much useful information by having a legend with keys for all panels.
I want to customize the legend so I can pick the most expensive/cheapest panels and just highlight those.
While I do have the panel id's that I want to highlight, ie I can write
xtline price, overlay legend(order(id_a "firma" id_b "firmb" id_c "firmc")
(where id_a id_b id_c are numerals corresponding to the panel id's of interest).
However from some experimentation using xtline, I have noticed that what should go in the place of id_a, id_b, id_c are merely the corresponding keys of the panels in the xtline plot.
ie. that go from 1, 2, 3, ....... , n. Where n is the amount of panels.
2 Questions:
1. How are the keys generated in xtline for plotting, is there a way to find the right key for the corresponding panel id of interest?
2. Is there a better way for me to try and do this?
Thanks,
Appreciate the help.
Marc
I am working with a large panel (>80) of historical prices over a number of years.
I want to graph the panels over time. This is easy enough because I can use the xtline command and overlay the panels with a command like:
xtline price, overlay legend(order())
However as you can see from the attached photo I'm not gaining much useful information by having a legend with keys for all panels.
I want to customize the legend so I can pick the most expensive/cheapest panels and just highlight those.
While I do have the panel id's that I want to highlight, ie I can write
xtline price, overlay legend(order(id_a "firma" id_b "firmb" id_c "firmc")
(where id_a id_b id_c are numerals corresponding to the panel id's of interest).
However from some experimentation using xtline, I have noticed that what should go in the place of id_a, id_b, id_c are merely the corresponding keys of the panels in the xtline plot.
ie. that go from 1, 2, 3, ....... , n. Where n is the amount of panels.
2 Questions:
1. How are the keys generated in xtline for plotting, is there a way to find the right key for the corresponding panel id of interest?
2. Is there a better way for me to try and do this?
Thanks,
Appreciate the help.
Marc
Comment