Greetings,
I am trying to create a graph legend that includes labels above the keys, like this:

Currently I need to use the graph editor to achieve it; I begin with
Which produces this:

Then I use the Graph editor in grid edit mode to move the words "foreign" and "domestic" into the right columns, and to resize them.
I realize that I probably can't get those labels in a different size through the command line, but I wonder if there is a way to get them placed right?
Thanks for any thoughts!
FWIW, the .grec file created by my edit has this:
I am trying to create a graph legend that includes labels above the keys, like this:
Currently I need to use the graph editor to achieve it; I begin with
Code:
gr twoway connected mpg price if foreign || /// connected mpg price if !foreign || /// connected weight price if foreign || /// connected weight price if !foreign , /// legend( /// order(- "foreign" - "domestic" 1 "Mileage" 2 "" 3 "Weight" 4 "") /// size(vsmall) colgap(vsmall) keygap(vsmall) just(center)/// )
Then I use the Graph editor in grid edit mode to move the words "foreign" and "domestic" into the right columns, and to resize them.
I realize that I probably can't get those labels in a different size through the command line, but I wonder if there is a way to get them placed right?
Thanks for any thoughts!
FWIW, the .grec file created by my edit has this:
Code:
StataFileTM:00001:01100:GREC: : 00004:00004:00001: *! classname: twowaygraph_g *! family: twoway *! date: 12 Aug 2015 *! time: 13:26:57 *! graph_scheme: n1mono *! naturallywhite: 1 *! end // File created by Graph Editor Recorder. // Edit only if you know what you are doing. .legend.plotregion1.move label[1] on 5 1 // label[1] grid reposition .legend.plotregion1.move label[2] on 5 5 // label[2] grid reposition .legend.plotregion1.label[2].style.editstyle box_alignment(center) editcopy // label[2] compass position .legend.plotregion1.label[2].style.editstyle size(small) editcopy // label[2] size .legend.plotregion1.label[1].style.editstyle size(small) editcopy // label[1] size .legend.plotregion1.label[1].style.editstyle box_alignment(center) editcopy // label[1] compass position // <end>
Comment