前段时间我发现了一种以很好的方式加入Axes的方法。现在我重新审视报告的情节,我发现我不满意......
原因是我的情节tics
处的标签之间存在重叠。由于我加入了轴,右边的一个图tics
的左边和第一个将重叠,如下面的例子所示,随机的sin和cos绘制。
我怎样才能以一般方式规避这一点。请注意,我将在系列中绘制很多这样的数字,根据我的数据值,找出每个tics
不是我的选项。
提前致谢!
我的情节文件:JointAxes.gp
# Generic gnuPlot script for plotting multiple plots in a single figure
# Resetting all variables. Standard for all plots.
reset
# Setting (terminal) options.
set terminal pdfcairo color font ",8"
set output 'JointAxes.pdf'
# Option to plot multiple graphs in one picture, note the number of figs here is 4 (2 by 2).
set multiplot layout 2,2 rowsfirst
# Macro's needed to produce a figure with all plots 'touching'.
set macros
# Small plot labels
LABEL = "at graph 0.9,0.9"
# Axes adjustment
set format x "%.1f"
XAXE = 'set xlabel "Extent"; set xtics -2*pi,pi/3 # N.B. tics should be changed due to conjoined axes.
YAXE = 'set ylabel "Amplitude"; set ytics -1,0.25
NOX = "unset xtics;\
unset xlabel"
NOY = "unset ytics;\
unset ylabel"
# Locking the graphs at fixed points in the figure
# Margins for each row resp. column
TMARGIN = "set tmargin at screen 0.90; set bmargin at screen 0.55"
BMARGIN = "set tmargin at screen 0.55; set bmargin at screen 0.20"
LMARGIN = "set lmargin at screen 0.10; set rmargin at screen 0.50"
RMARGIN = "set lmargin at screen 0.50; set rmargin at screen 0.90"
# General plot markup
unset key
# Legend/key adjustment
# set key samplen 3 # length of legend colour-bar
# set key spacing 1 # spacing between samples
# Optional: Adjusting range
set yrange [-1:1]
set xrange [-pi:pi]
# Plotting the first of the 'sub'-plot
@YAXE; @NOX
@TMARGIN; @LMARGIN
set label 1 'a' @LABEL
plot sin(x)
# Plotting the second 'sub'-plot, i.e. a new plot command.
@NOX; @NOY
@TMARGIN; @RMARGIN
set label 1 'b' @LABEL
plot cos(x)
# Plotting 3rd
@YAXE; @XAXE
@BMARGIN; @LMARGIN
set label 1 'c' @LABEL
plot sin(x + 1.57)
#And Fourth
@NOY; @XAXE
@BMARGIN; @RMARGIN
set label 1 'd' @LABEL
plot cos(x + 1.57)
unset multiplot
set terminal wxt
set output
# OEF