Announcement

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

  • Save legend only

    I'd like to save the legend apart from a graph, so that i can embed figures in latex and use a master legend beneath. Is there a way to isolate the legend without the graph?

  • #2
    No and yes.

    No, (imho), you can't make Stata save the legend of a graph separately from that graph.
    Yes, you can :
    a) build a graph yourself that represents (visually appears to be or looks like) a legend (if you know what your legend must look like), or
    b) export a picture with a legend, then write a program that locates and cuts the legend from the picture to save as a separate file.

    Option A is more convenient if, say you always use two lines and one of them is red and another one is blue, and you want to explain this to a reader. Option B is more convenient when you are dealing with an unpredictable graph, and you don't know how many series will be there or how exactly Stata will select the markers for them, etc.

    Can you combine the graphs in Stata instead, then insert the combined graph into TeX?

    Best, Sergiy Radyakin

    Comment

    Working...
    X