何时将 pgfplots 关键字写在一起是否有一般规则?

何时将 pgfplots 关键字写在一起是否有一般规则?

当使用 tikz 尤其是 pgfplots 时,我发现常常很难记住关键字是一起写还是分开写。

一起写的关键字的示例为:

  • xticklabels
  • enlargelimits
  • ymajorgrids

还有很多。

分开书写的关键字示例包括:

  • extra x tick label
  • y domain

还有很多。

再比如,库fillbetween写在一起了,而plot命令\addplot fill between没有写。

是否存在什么系统或规则来规定何时将关键词分开写,何时将其写成一个单词?

关键词单数和复数时也有规则吗?

答案1

我经常发现很难记住关键字是连在一起还是分开写

最好的记忆方法(除了拥有强大的记忆力)是使用某种备忘单。您可以参考最后的列表。

是否存在什么系统或规则来规定何时将关键词分开写,何时将其写成一个单词?

关键词单数和复数时也有规则吗?

归根结底,这是一个只有开发人员才能回答的设计选择。不过,以下是一些观察结果:

  • 软件包提供的几乎所有键pgf都使用分隔的单词。只有少数例外,例如

    xbar
    xcomb
    xrange
    xscale
    xshift
    xslant
    xstep
    
  • pgfplots是基于 构建的pgf,因此, 中的大多数键都pgf应该可以在 中使用pgfplots

  • pgfplots提供了一些别名,它们只是键的粘合版本pgf。这些是使用pgfkeys包定义的pgfplots.code.tex(源文件之一pgfplots)。以下是一些片段:

    \pgfplots@cmdkey@alias xlabel style=x label style;
    \pgfplots@cmdkey@alias ylabel style=y label style;
    \pgfplots@cmdkey@alias zlabel style=z label style;
    \pgfplots@cmdkey@alias xticklabel style=x tick label style;
    \pgfplots@cmdkey@alias yticklabel style=y tick label style;
    \pgfplots@cmdkey@alias zticklabel style=z tick label style;
    \pgfplots@cmdkey@alias ticklabel style=tick label style;
    \pgfplots@cmdkey@alias xtick style=x tick style;
    \pgfplots@cmdkey@alias ytick style=y tick style;
    \pgfplots@cmdkey@alias ztick style=z tick style;
    

这是从手动索引(v1.3)中提取的所有键的(原始)列表,pgfplots可能会有所帮助。

after end axis 
allow reversal of rel axis cs 
anchor 
area cycle list 
area legend 
area style 
at 
axis background 
axis base prefix 
axis equal image 
axis equal 
axis line style 
axis lines 
axis lines* 
axis on top 
axis x discontinuity 
axis x line 
axis x line* 
axis y discontinuity 
axis y line 
axis y line* 
axis z discontinuity 
az 
bar cycle list 
bar shift 
bar width 
before end axis 
blackwhite 
bluered 
change x base 
change y base 
change z base 
check 
classes 
clickable 
clip 
clip limits 
clip marker paths 
col sep 
color 
colorbar horizontal 
colorbar 
colorbar left 
colorbar right 
colorbar shift 
colorbar style 
colormap access 
colormap 
colormap name 
cols 
columns 
compat 
const plot 
const plot mark left 
const plot mark right 
cool 
cycle list 
cycle list name 
cycle multi list 
dashed 
date coordinates in 
date ZERO 
densely dashed 
densely dotted 
disabledatascaling 
disablelogfilter 
domain 
domain y 
dotted 
draw error bar 
draw 
each nth point 
el 
enlarge x limits 
enlarge y limits 
enlarge z limits 
enlargelimits 
error bar style 
error mark 
error mark options 
every 3d box foreground 
every 3d description 
every 3d view {hh i}{hv i} 
every axis grid 
every axis 
every axis label 
every axis legend 
every axis plot 
every axis plot no # 
every axis plot post 
every axis title 
every axis x grid 
every axis x label 
every axis y grid 
every axis y label 
every axis z grid 
every axis z label 
every boxed x axis 
every boxed y axis 
every boxed z axis 
every colorbar 
every crossref picture 
every error bar 
every extra x tick 
every extra y tick 
every extra z tick 
every forget plot 
every inner x axis line 
every inner y axis line 
every inner z axis line 
every linear axis 
every loglog axis 
every major grid 
every major tick 
every major x grid 
every major x tick 
every major y grid 
every major y tick 
every major z grid 
every major z tick 
every mark 
every minor grid 
every minor tick 
every minor x grid 
every minor x tick 
every minor y grid 
every minor y tick 
every minor z grid 
every minor z tick 
every node near coord 
every non boxed x axis 
every non boxed y axis 
every non boxed z axis 
every outer x axis line 
every outer y axis line 
every outer z axis line 
every semilogx axis 
every semilogy axis 
every tick 
every tick label 
every x tick 
every x tick label 
every x tick scale label 
every y tick 
every y tick label 
every y tick scale label 
every z tick 
every z tick label 
every z tick scale label 
execute at begin plot 
execute at end plot 
extra description 
extra tick style 
extra x tick label 
extra x tick labels 
extra x tick style 
extra x ticks 
extra y tick label 
extra y tick labels 
extra y tick style 
extra y ticks 
extra z tick label 
extra z tick labels 
extra z tick style 
extra z ticks 
faceted color 
figure name 
fill 
filter discard warning 
filter point 
font 
footnotesize 
forget plot 
forget plot style 
fpu 
greenyellow 
grid 
grid style 
group name 
group size 
group style 
h 
header 
height 
hide axis 
hide x axis 
hide y axis 
hide z axis 
horizontal sep 
hot 
id 
ignore first 
includegraphics 
inner axis line style 
js fillColor 
jsname 
jump mark left 
jump mark right 
label shift 
label style 
legend columns 
legend entries 
legend image code 
legend plot pos 
legend pos 
legend style 
line legend 
line width 
log base 10 number format code 
log basis x 
log basis y 
log basis z 
log identify minor tick positions 
log number format basis 
log number format code 
log plot exponent style 
loosely dashed 
loosely dotted 
lowlevel draw 
major grid style 
major tick length 
major tick style 
major x grid style 
major x tick style 
major y grid style 
major y tick style 
major z grid style 
major z tick style 
mark options 
mark size 
math parser 
max space between ticks 
mesh 
mesh legend 
meta expr 
meta index 
meta 
minor grid style 
minor tick length 
minor tick num 
minor tick style 
minor x grid style 
minor x tick num 
minor x tick style 
minor y grid style 
minor y tick num 
minor y tick style 
minor z grid style 
minor z tick num 
minor z tick style 
no markers 
node 
nodes near coords align 
nodes near coords 
normalsize 
only marks 
ordering 
outer axis line style 
overlay 
parent axis height 
parent axis width 
plot box ratio 
plot graphics 
point format 
point meta 
point meta max 
point meta min 
point meta rel 
precision 
prefix 
printable 
raw gnuplot 
read completely 
redyellow 
refstyle 
restrict expr to domain 
restrict x to domain 
restrict y to domain 
restrict z to domain 
reverse legend 
reverse stacked plots 
rows 
samples at 
samples 
samples y 
scale only axis 
scale ticks above 
scale ticks below 
scaled ticks 
scaled x ticks 
scaled y ticks 
scaled z ticks 
scanline verbose 
scatter 
scatter src 
semithick 
separate axis lines 
set point meta if empty 
shader 
sharp plot 
size x 
size y 
size z 
skip coords between index 
skip first 
slope format 
sloped like x axis 
sloped like y axis 
sloped like z axis 
small 
smooth 
solid 
stack dir 
stack plots 
subtickwidth 
surf 
symbolic x coords 
symbolic y coords 
symbolic z coords 
system call 
text mark as node 
text mark 
text mark style 
textSize 
thick 
thin 
tick align 
tick label style 
tick pos 
tick scale binop 
tick scale label code 
tick style 
ticklabel pos 
ticklabel shift 
ticklabel style 
ticks 
tickwidth 
title 
title style 
translate gnuplot 
try min ticks 
try min ticks log 
ultra thick 
ultra thin 
unbounded coords 
unit code 
unit marking post 
unit marking pre 
unit markings 
use mapped color 
use units 
v 
vertical sep 
very thick 
very thin 
view 
violet 
width 
x axis line style 
x coord inv trafo 
x coord trafo 
x dir 
x error expr 
x error index 
x error 
x explicit 
x explicit relative 
x expr 
x filter 
x fixed 
x fixed relative 
x grid style 
x index 
x 
x label style 
x SI prefix 
x tick label as interval 
x tick label style 
x tick scale label style 
x tick style 
x unit 
x unit prefix 
xbar interval 
xbar interval legend 
xbar interval stacked 
xbar 
xbar legend 
xbar stacked 
xcomb 
xlabel absolute 
xlabel 
xlabel near ticks 
xlabel shift 
xlabel style 
xmajorgrids 
xmajorticks 
xmax 
xmin 
xminorgrids 
xminorticks 
xmode 
xshift 
xtick align 
xtick 
xtick placement tolerance 
xtick pos 
xtick scale label code 
xticklabel interval boundaries 
xticklabel 
xticklabel pos 
xticklabel shift 
xticklabel style 
xticklabels at 
xticklabels from table 
xticklabels 
xtickmax 
xtickmin 
xtickten 
y axis line style 
y coord inv trafo 
y coord trafo 
y dir 
y domain 
y error expr 
y error index 
y error 
y explicit 
y explicit relative 
y expr 
y filter 
y fixed 
y fixed relative 
y grid style 
y index 
y 
y label style 
y SI prefix 
y tick label as interval 
y tick label style 
y tick scale label style 
y tick style 
y unit 
y unit prefix 
ybar interval 
ybar interval legend 
ybar interval stacked 
ybar 
ybar legend 
ybar stacked 
ycomb 
ylabel absolute 
ylabel 
ylabel near ticks 
ylabel shift 
ylabel style 
ymajorgrids 
ymajorticks 
ymax 
ymin 
yminorgrids 
yminorticks 
ymode 
yshift 
ytick align 
ytick 
ytick placement tolerance 
ytick pos 
ytick scale label code 
yticklabel interval boundaries 
yticklabel 
yticklabel pos 
yticklabel shift 
yticklabel style 
yticklabels at 
yticklabels from table 
yticklabels 
ytickmax 
ytickmin 
ytickten 
z axis line style 
z buffer 
z coord inv trafo 
z coord trafo 
z dir 
z error expr 
z error index 
z error 
z explicit 
z explicit relative 
z expr 
z filter 
z fixed 
z fixed relative 
z grid style 
z index 
z 
z label style 
z SI prefix 
z tick label as interval 
z tick label style 
z tick scale label style 
z tick style 
z unit 
z unit prefix 
zbar interval legend 
zbar legend 
zlabel absolute 
zlabel 
zlabel near ticks 
zlabel shift 
zlabel style 
zmajorgrids 
zmajorticks 
zmax 
zmin 
zminorgrids 
zminorticks 
zmode 
ztick align 
ztick 
ztick placement tolerance 
ztick pos 
ztick scale label code 
zticklabel interval boundaries 
zticklabel 
zticklabel pos 
zticklabel shift 
zticklabel style 
zticklabels from table 
zticklabels 
ztickmax 
ztickmin 
ztickten 

相关内容