I'm using a user-created command (-synth2-) that generates multiple graphs as outputs. I want to be able to edit these graphs with code, but there doesn't seem to be an easy way to do this with the synth2 command. Thus, I am instead trying to use the -gr_edit- command.
However, I'm running into a problem where the -gr_edit- command only applies changes to the last graph generated by the synth2 command. I don't know how to get gr_edit to refer to a specific graph.
To demonstrate my issue, consider the following example. Suppose I generate a scatterplot (graph1) and a histogram (graph2).
Suppose I want to use gr_edit to make the scatterplot markers orange and the histogram bars blue. How would I do this?
My attempt was:
Since I don't know how to get gr_edit to refer to specific graphs (e.g. "graph1" vs. "graph2"), this command just made the histogram bars blue and didn't do anything to the scatterplot markers.
However, I'm running into a problem where the -gr_edit- command only applies changes to the last graph generated by the synth2 command. I don't know how to get gr_edit to refer to a specific graph.
To demonstrate my issue, consider the following example. Suppose I generate a scatterplot (graph1) and a histogram (graph2).
Code:
sysuse auto, clear scatter price mpg, name(graph1) histogram price, name(graph2)
My attempt was:
Code:
gr_edit plotregion1.plot1.style.editstyle marker(fillcolor(orange)) editcopy gr_edit plotregion1.plot1.style.editstyle marker(linestyle(color(orange))) editcopy gr_edit plotregion1.plot1.style.editstyle area(shadestyle(color(blue))) editcopy

Comment