SAS PROTOTYPE、SIDERBAR
PROTOTYPE是用到DATAPANEL、DATALATTICE、LATTICE中
SIDEBAR / align = RIGHT LEFT TOP BOTTOM指定位置
A sidebar spans across columns or rows and is useful for displaying information that applies to all of the columns or all of the rows.
innermargin是在cell内部插入blockplot或axisplot,sidebar是在整行或整列插入文本。
inset就是在cell中插入文本。
ods html; proc template; define statgraph _datapanel5; begingraph; layout datapanel classvars = (origin) / INSET = ( make model) headerlabeldisplay = value columns = 2 rowaxisopts = ( griddisplay = on offsetmin = 0) columnaxisopts = (display = (ticks tickvalues) linearopts = (tickvaluefitpolicy = thin) tickvalueattrs = (size = 7)); layout prototype / cycleattrs = true; barchart x = type y = mpg_city / stat = mean dataskin = gloss datatransparency = 0.3 barlabel = true name = "c" legendlabel = "City" ; barchart x = type y = mpg_highway / stat = mean dataskin = gloss datatransparency = 0.3 barwidth = 0.5 barlabel = true name = "d" legendlabel = "Highway" ; innermargin / ; axistable x = type value = mpg_city; endinnermargin; endlayout; sidebar / align = right; discretelegend 'c' 'd' / location = inside across = 1; endsidebar; sidebar / align = top; layout gridded / border=true ; entry "Top Sidebar" ; entry "(spans both columns)"; endlayout; endsidebar; endlayout; endgraph; end; run; proc sgrender data = sashelp.cars(where = (type not in ("Hybird" "Truck" "Wagon"))) template = _datapanel5; run;