I use -tabplot- from SSC in version 2.7.2 NJC 30 June 2017 and wonder why -tabplot- ignores a textsize for a subtitle given by my specific scheme. Whereas it looks like a charm which -ciplot- (from SSC version 1.1.1 from 2011). It would be great if you tell me if I can improve my code to get the subtitle textsize I want in -tabplot-. Thank you.
My setup:
I use a scheme based on s2color and created a -graphsetup- program as proposed by Ben Jann in "Customizing Stata Graphs made Easy (Part 1)", Stata Journal 18(3) https://doi.org/10.1177%2F1536867X1801800301.
Code:
sysuse auto, clear graphsetup 15 12 tabplot foreign rep78, percent(foreign) sep(foreign) bar1(bcolor(red*0.5)) bar2(bcolor(blue*0.5)) showval(offset(0.05) format(%2.1f)) title("Subtitle size ignored") subtitle(% by origin) name(tabplot, replace) ciplot rep78, by(foreign) subtitle(% by origin) title("Subtitle size respected") name(ciplot, replace)
- tabplot-
Array
-ciplot-
Array
My graphsetup- program:
Code:
program graphsetup args x y local xsize =`x'/2.54 local ysize =`y'/2.54 local rsize = min(`xsize', `ysize') foreach pt in.5.7511.5356810121416182228{ local nm:subinstr local pt ".""_" local`nm'pt =`pt'/(`rsize'*72)*100 } grstyle init grstyle graphsize x `xsize' grstyle graphsize y `ysize' grstyle symbolsize p `3pt' grstyle linewidth axisline `_5pt' grstyle linewidth tick `_5pt' grstyle linewidth major_grid `_5pt' grstyle linewidth legend `_5pt' grstyle linewidth xyline `_5pt' grstyle gsize `10pt' grstyle gsize gap `3pt' grstyle gsize text `8pt' grstyle gsize body `8pt' grstyle gsize small_body `6pt' grstyle gsize heading `12pt' grstyle gsize subheading `10pt' grstyle gsize axis_title `8pt' grstyle gsize matrix_label `16pt' grstyle gsize label `8pt' grstyle gsize small_label `6pt' grstyle gsize matrix_marklbl `3pt' grstyle gsize key_label `8pt' grstyle gsize note`6pt' grstyle gsize star `10pt' grstyle gsize text_option `10pt' grstyle gsize dot_rectangle `1pt' grstyle gsize axis_space `1_5pt' grstyle gsize axis_title_gap `1_5pt' grstyle gsize tick `3pt' grstyle gsize minortick `1_5pt' * grstyle gsize minortick .55 grstyle gsize tickgap `1_5pt' grstyle gsize notickgap `3pt' grstyle gsize tick_label `8pt' grstyle gsize tick_biglabel `10pt' grstyle gsize minortick_label `5pt' grstyle gsize filled_text `10pt' grstyle gsize reverse_big `16pt' grstyle gsize alternate_gap zero grstyle gsize title_gap `5pt' grstyle gsize key_gap `5pt' grstyle gsize key_linespace `5pt' grstyle gsize star_gap `_5pt' grstyle gsize legend_colgap `3pt' grstyle gsize label_gap `1_5pt' grstyle gsize matrix_mlblgap `1_5pt' grstyle gsize barlabel_gap `3pt' grstyle gsize legend_row_gap `3pt' grstyle gsize legend_col_gap `8pt' grstyle gsize legend_key_gap `5pt' grstyle gsize legend_key_ysize `3pt' grstyle gsize zyx2legend_key_gap `3pt' grstyle gsize zyx2legend_key_xsize `6pt' grstyle gsize zyx2legend_key_ysize `6pt' grstyle gsize zyx2rowgap zero grstyle gsize zyx2colgap `16pt' grstyle gsize clegend_width `22pt' grstyle gsize clegend_height zero grstyle gsize pie_explode `12pt' grstyle gsize pielabel_gap zero grstyle gsize plabel `8pt' grstyle gsize pboxlabel `8pt' * grstyle gsize p#label `8pt' * grstyle gsize p#boxlabel `8pt' grstyle gsize sts_risktable_space `1pt' grstyle gsize sts_risktable_tgap zero grstyle gsize sts_risktable_lgap zero grstyle gsize sts_risk_label `10pt' grstyle gsize sts_risk_title `10pt' grstyle gsize sts_risk_tick zero grstyle relsize bar_gap 0pct grstyle relsize bar_groupgap 67pct grstyle relsize bar_supgroupgap 200pct grstyle relsize bar_outergap 20pct grstyle relsize dot_gap neg100pct grstyle relsize dot_groupgap 0pct grstyle relsize dot_supgroupgap 67pct grstyle relsize dot_outergap 0pct grstyle relsize box_gap 33pct grstyle relsize box_groupgap 100pct grstyle relsize box_supgroupgap 200pct grstyle relsize box_outergap 20pct grstyle relsize box_fence 67pct grstyle relsize box_fencecap 0pct grstyle symbolsize `10pt' grstyle symbolsize symbol `10pt' grstyle symbolsize smallsymbol `8pt' grstyle symbolsize star `8pt' grstyle symbolsize histogram`8pt' grstyle symbolsize histback `8pt' grstyle symbolsize dots `3pt' grstyle symbolsize ci`8pt' grstyle symbolsize ci2 `8pt' grstyle symbolsize matrix`8pt' grstyle symbolsize refmarker `8pt' grstyle symbolsize sunflower`8pt' grstyle symbolsize backsymbol `8pt' grstyle symbolsize backsymspace `8pt' grstyle symbolsize p `8pt' grstyle symbolsize pback zero grstyle symbolsize parrow `8pt' grstyle symbolsize parrowbarb zero grstyle * symbolsize p#`16pt' * grstyle symbolsize p#back `16pt' * grstyle symbolsize p#box `16pt' * grstyle symbolsize p#boxback `16pt' * grstyle symbolsize p#dot `16pt' * grstyle symbolsize p#dotback `16pt' * grstyle symbolsize p#arrow `16pt' * grstyle symbolsize p#arrowbarb `16pt' *** Allgemeine Vorgaben grstyle intensity p inten100 end
0 Response to -tabplot- (SSC) ignoring scheme-specific subtitle size?
Post a Comment