I do have two "twoway connected plots" that I want to combine side by side of each other.
(To give an example:
graph 1: process 1
graph 2: process 2
y-axes for both graphs: temperature in process
x-axes: stage in process)
The problem is that the second graph has only half of the range values on the x-axis. While graph 1 has 100 points on the x-axis, graph 2 has only 50 points (process 1 has 100 stages, process 2 has 50 stages). If I produce the graphs normally, graph2 will be stretched to the standard size. As such the distances between the data points will be twice as large as in the graph1. This would irritate all readers.
My aim: I would like to have the same distance between value labels on both axes. That is, the x-axes of graph2 should be the half of the standard/graph1. At the same time, the y-axes need to have the same height.
I specified - fxsize() - for both graphs and gave the graph1 the double size of graph2. I defined - fysize() - in addition and gave both the same value, 80% of the available size. I then combined both graphs with - graph combine -.
Unfortunately, the graphs still have slightly different sizes. Although the ticks on the x-axis seem to have the same distance on both graphs, the x-axis of the second graph lies slightly higher than for the first! In the last 4 hours, I have tried with different combinations of - ycommon, ysize(), margins(zeor) etc. - and also manual refinement of the values in - fxsize() - as proposed in another post on this issue. But it just does not work
!
Could anybody please help me by giving a hint how to solve this issue? I can't imagine that there is no way how this could work?
The threads on the topic I have found so far:
http://www.stata.com/statalist/archi.../msg00582.html
http://www.stata.com/statalist/archi.../msg00634.html
My code:
* Process 1
# delimit ;
twoway connected var1 var2 if process=1,
msymbol(S) mcolor(gs2) msize(medsmall)
lcolor(gs2) lwidth(0.3) lpattern(shortdash)
title("Process 1", size(small)) ytitle("Temperature", size(vsmall)) xtitle("Stage")
fxsize(100) fysize(80) ylabel(, labsize(vsmall)) graphregion(margin(zero)) plotregion(margin(zero))
bgcolor(white) graphregion(color(white))
name(grapha, replace);
# delimit cr;
* Process 2
# delimit ;
twoway connected var1 var2 if process=2,
msymbol(S) mcolor(gs2) msize(medsmall)
lcolor(gs2) lwidth(0.3) lpattern(shortdash)
title("Process 2", size(small)) ytitle("Temperature", size(vsmall)) xtitle("Stage")
fxsize(50) fysize(80) ylabel(, labsize(vsmall)) graphregion(margin(zero)) plotregion(margin(zero))
bgcolor(white) graphregion(color(white))
name(grapha, replace);
# delimit cr;
# delimit cr;
* combine
gr combine grapha graphb, row(1) name(graph, replace) iscale(1) ycommon title("Temperature on stage by process", size(small)) graphregion(color(white))
(To give an example:
graph 1: process 1
graph 2: process 2
y-axes for both graphs: temperature in process
x-axes: stage in process)
The problem is that the second graph has only half of the range values on the x-axis. While graph 1 has 100 points on the x-axis, graph 2 has only 50 points (process 1 has 100 stages, process 2 has 50 stages). If I produce the graphs normally, graph2 will be stretched to the standard size. As such the distances between the data points will be twice as large as in the graph1. This would irritate all readers.
My aim: I would like to have the same distance between value labels on both axes. That is, the x-axes of graph2 should be the half of the standard/graph1. At the same time, the y-axes need to have the same height.
I specified - fxsize() - for both graphs and gave the graph1 the double size of graph2. I defined - fysize() - in addition and gave both the same value, 80% of the available size. I then combined both graphs with - graph combine -.
Unfortunately, the graphs still have slightly different sizes. Although the ticks on the x-axis seem to have the same distance on both graphs, the x-axis of the second graph lies slightly higher than for the first! In the last 4 hours, I have tried with different combinations of - ycommon, ysize(), margins(zeor) etc. - and also manual refinement of the values in - fxsize() - as proposed in another post on this issue. But it just does not work

Could anybody please help me by giving a hint how to solve this issue? I can't imagine that there is no way how this could work?
The threads on the topic I have found so far:
http://www.stata.com/statalist/archi.../msg00582.html
http://www.stata.com/statalist/archi.../msg00634.html
My code:
* Process 1
# delimit ;
twoway connected var1 var2 if process=1,
msymbol(S) mcolor(gs2) msize(medsmall)
lcolor(gs2) lwidth(0.3) lpattern(shortdash)
title("Process 1", size(small)) ytitle("Temperature", size(vsmall)) xtitle("Stage")
fxsize(100) fysize(80) ylabel(, labsize(vsmall)) graphregion(margin(zero)) plotregion(margin(zero))
bgcolor(white) graphregion(color(white))
name(grapha, replace);
# delimit cr;
* Process 2
# delimit ;
twoway connected var1 var2 if process=2,
msymbol(S) mcolor(gs2) msize(medsmall)
lcolor(gs2) lwidth(0.3) lpattern(shortdash)
title("Process 2", size(small)) ytitle("Temperature", size(vsmall)) xtitle("Stage")
fxsize(50) fysize(80) ylabel(, labsize(vsmall)) graphregion(margin(zero)) plotregion(margin(zero))
bgcolor(white) graphregion(color(white))
name(grapha, replace);
# delimit cr;
# delimit cr;
* combine
gr combine grapha graphb, row(1) name(graph, replace) iscale(1) ycommon title("Temperature on stage by process", size(small)) graphregion(color(white))
Comment