2.关于坐标轴 help axis_options 复制代码然后会出现: axis_options are grouped into four classes. axis_title_options specify the titles to appear next to the axes. They also allow you to format the title fonts. See [G-3] axis_title_options. axis_label_options specify how the axes should be labeled and ticked. These options allow you to control the placement of major and minor ticks and labels. axis_label_options also allow you to add or to suppress grid lines on your graphs. See [G-3] axis_label_options. axis_scale_options specify how the axes should be scaled -- either logarithmic scaled or reverse scaled to run from maximum to minimum. These options also allow you to change the range of the axes and the look of the lines that are the axes, including placement. See [G-3] axis_scale_options. axis_choice_options control the specific axis on which a plot appears when there are multiple x or y axes. See [G-3] axis_choice_options. 每一项里都有很多细节可以调整 (1)设置横纵坐标标题的字体、方向和大小等 在ytitle、xtitle、 ttitle或者ztitle的option里用以下格式写命令,其中“某个字体的名字”和“坐标轴的标题”用相应的名称替换: `"{fontface 某个字体的名字:坐标轴的标题}"' 复制代码至于ytitle、xtitle、 ttitle或者ztitle是什么参见: help axis_title_options 复制代码axis_title_options Description ----------------------------------------------------- ytitle(axis_title) specify y axis title xtitle(axis_title) specify x axis title ttitle(axis_title) specify t (time) axis title ztitle(axis_title) specify contour legend axis title 如果想让坐标轴的标题横过来,需要再加axis_title的option“,orientation(horizontal)”但同时坐标轴的每个字都要分开写,否则一行字都会横过来,相当占地方。调整坐标名称大小的话直接加axis_title的option“size( ) ”,具体字符大小的参数和前面提到的一样。举个例子: ,ytitle(`"{fontface 楷体:地}"'`"{fontface 楷体:方}"'`"{fontface 楷体:财}"'`"{fontface 楷体:政}"'`"{fontface 楷体:一}"'`"{fontface 楷体:般}"'`"{fontface 楷体:预}"'`"{fontface 楷体:算}"'`"{fontface 楷体:支}"'`"{fontface 楷体:出}"'`"{fontface 楷体:(万元)}"',orientation(horizontal) size( medium ) ) 复制代码(2)设置横纵坐标轴刻度线的位置 可以选(outside|crossing| inside) scatter trade date, xlabel( ,tposition(inside) ) ylabel( ,tposition(inside) ) 复制代码(3)坐标轴起始值显示为0 需要用到plotregion的option margin [backcolor=rgb(247, 247, 247)]scatter trade date, [/backcolor]plotregion(margin(0)) 复制代码(4)坐标轴是否向外延伸 [backcolor=rgb(247, 247, 247)]scatter trade date, [/backcolor]xscale(extend outergap(5pt) ) yscale(extend) (责任编辑:) |