Hello everybody,
I am creating two subplots that I would like to combine with "graph combine". The lengnth of the y-axis labels differs and, as a consequence, the space between the y-axis line and the margin of the plot differs, which does not look very nice when combine the two plots.
Here's a code example and the output:
The problem is the offset between the y-axes (see red rectangle). I thought a solution could be to explicitly control the space between the y-axis line and the graph margin (see green arrows), but I could not figure out how to do that.
Does anybody have a suggestion how to solve this issue?
By the way: I would like the y-labels to be horizontal and to combine the subplots in 2 rows -- so simply changing these design aspects is not a solution
I tried searching the forum for related posts in advance, but could'nt find any -- but if you know of one, please share!
Thanks in advance!
Best,
Boris
I am creating two subplots that I would like to combine with "graph combine". The lengnth of the y-axis labels differs and, as a consequence, the space between the y-axis line and the margin of the plot differs, which does not look very nice when combine the two plots.
Here's a code example and the output:
Code:
sysuse auto, clear capt ssc install cleanplots set scheme cleanplots twoway (scatter price weight, graphregion(lcol(black)) name(g1, replace)) twoway (scatter mpg weight, graphregion(lcol(black)) name(g2, replace)) graph combine g1 g2, xcommon rows(2)
The problem is the offset between the y-axes (see red rectangle). I thought a solution could be to explicitly control the space between the y-axis line and the graph margin (see green arrows), but I could not figure out how to do that.
Does anybody have a suggestion how to solve this issue?
By the way: I would like the y-labels to be horizontal and to combine the subplots in 2 rows -- so simply changing these design aspects is not a solution
I tried searching the forum for related posts in advance, but could'nt find any -- but if you know of one, please share!
Thanks in advance!
Best,
Boris
Comment