I would like to build a graph where the proportions of the plotregion (not the whole graph, but specifically the plotregion) are predetermined.
Here is an example:
Code:
clear all sysuse auto regress price length weight foreign predict pricehat twoway scatter price pricehat if foreign==0 /// || scatter price pricehat if foreign==1, /// xsize(4) ysize(4) legend(rows(2)) /// xlabel(,grid) ylabel(,grid) /// title("Some title")
How can I specify the proportions of the plotregion specifically, so that everything else is fit around it automatically? I don't want to have a million different versions of proportions depending on how long the title is or how many categories in the legend, etc.
My ideal graph would then be slimmer, leaving larger margins left and right, for the same height, to match the 1:1 proportion.
I am hoping that at least for a 1:1 proportion this can be done using the built-in machinery, as an undocumented property autosquare100 exists, which hopefully serves this purpose.
Thank you, Sergiy Radyakin
Array
0 Response to Constrain plotregion proportions
Post a Comment