| 1 |
% Copyright 2018 by Till Tantau |
| 2 |
% |
| 3 |
% This file may be distributed and/or modified |
| 4 |
% |
| 5 |
% 1. under the LaTeX Project Public License and/or |
| 6 |
% 2. under the GNU Free Documentation License. |
| 7 |
% |
| 8 |
% See the file doc/generic/pgf/licenses/LICENSE for more details. |
| 9 |
|
| 10 |
|
| 11 |
\section{Plot Mark Library} |
| 12 |
|
| 13 |
\begin{pgflibrary}{plotmarks} |
| 14 |
This library defines a number of plot marks. |
| 15 |
\end{pgflibrary} |
| 16 |
|
| 17 |
This library defines the following plot marks in addition to |*|, |x|, and |+| |
| 18 |
(the filling color has been set to a dark yellow): |
| 19 |
|
| 20 |
{ |
| 21 |
\catcode`\|=12 |
| 22 |
\medskip |
| 23 |
\begin{tabular}{lc} |
| 24 |
\plotmarkentry{-} |
| 25 |
\index{*vbar@\protect\texttt{\protect\myvbar} plot mark}% |
| 26 |
\index{Plot marks!*vbar@\protect\texttt{\protect\myvbar}} |
| 27 |
% |
| 28 |
\texttt{\char`\\pgfuseplotmark\char`\{\declare{|}\char`\}} & |
| 29 |
\tikz\draw [color=black!25] plot [ |
| 30 |
mark=|,mark options={fill=yellow,draw=black} |
| 31 |
] coordinates {(0,0) (.5,0.2) (1,0) (1.5,0.2)};\\ |
| 32 |
\plotmarkentry{o} |
| 33 |
\plotmarkentry{asterisk} |
| 34 |
\plotmarkentry{star} |
| 35 |
\plotmarkentry{10-pointed star} |
| 36 |
\plotmarkentry{oplus} |
| 37 |
\plotmarkentry{oplus*} |
| 38 |
\plotmarkentry{otimes} |
| 39 |
\plotmarkentry{otimes*} |
| 40 |
\plotmarkentry{square} |
| 41 |
\plotmarkentry{square*} |
| 42 |
\plotmarkentry{triangle} |
| 43 |
\plotmarkentry{triangle*} |
| 44 |
\plotmarkentry{diamond} |
| 45 |
\plotmarkentry{diamond*} |
| 46 |
\plotmarkentry{halfdiamond*} |
| 47 |
\plotmarkentry{halfsquare*} |
| 48 |
\plotmarkentry{halfsquare right*} |
| 49 |
\plotmarkentry{halfsquare left*} |
| 50 |
\plotmarkentry{pentagon} |
| 51 |
\plotmarkentry{pentagon*} |
| 52 |
\plotmarkentry{Mercedes star} |
| 53 |
\plotmarkentry{Mercedes star flipped} |
| 54 |
\plotmarkentry{halfcircle} |
| 55 |
\plotmarkentry{halfcircle*} |
| 56 |
\plotmarkentry{heart} |
| 57 |
\plotmarkentry{text} |
| 58 |
\end{tabular} |
| 59 |
} |
| 60 |
|
| 61 |
Note that each of the provided marks can be rotated freely by means of |
| 62 |
|mark options={rotate=90}| or |every mark/.append style={rotate=90}|. |
| 63 |
|
| 64 |
\begin{key}{/pgf/mark color=\marg{color} (initially empty)} |
| 65 |
Defines the additional fill color for the |halfcircle|, |halfcircle*|, |
| 66 |
|halfdiamond*| and |halfsquare*| markers. An empty value uses |white| |
| 67 |
(which is the initial configuration). The special value |none| disables |
| 68 |
filling of the respective parts. |
| 69 |
|
| 70 |
Note that |halfsquare| will be filled with |mark color|, and the starred |
| 71 |
variant |halfsquare*| will be filled half with |mark color| and half with |
| 72 |
the actual |fill| color. |
| 73 |
\end{key} |
| 74 |
|
| 75 |
|
| 76 |
{ |
| 77 |
\def\showit#1{% |
| 78 |
\tikz\draw[color=black!25] plot[#1,mark options={fill=examplefill,draw=black}] coordinates{(0,0) (.5,0.2) (1,0) (1.5,0.2)};}% |
| 79 |
|
| 80 |
\begin{key}{/pgf/text mark=\marg{text} (initially p)} |
| 81 |
Changes the text shown by |mark=text|. |
| 82 |
|
| 83 |
With |/pgf/text mark=m|: \pgfkeys{/pgf/text mark=m}\showit{mark=text} |
| 84 |
|
| 85 |
With |/pgf/text mark=A|: \pgfkeys{/pgf/text mark=A}\showit{mark=text} |
| 86 |
|
| 87 |
There is no limitation about the number of characters or whatever. In fact, |
| 88 |
any \TeX\ material can be inserted as \marg{text}, including images. |
| 89 |
\end{key} |
| 90 |
|
| 91 |
\begin{key}{/pgf/text mark as node=\marg{boolean} (initially false)} |
| 92 |
Configures how |mark=text| will be drawn: either as |\node| or as |\pgftext|. |
| 93 |
|
| 94 |
The first choice is highly flexible and possibly slow, the second is very |
| 95 |
fast and usually enough. |
| 96 |
\end{key} |
| 97 |
|
| 98 |
\begin{key}{/pgf/text mark style=\marg{options for \texttt{mark=text}}} |
| 99 |
Defines a set of options which control the appearance of |mark=text|. |
| 100 |
|
| 101 |
If |/pgf/text mark as node=false| (the default), \marg{options} is provided |
| 102 |
as argument to |\pgftext| -- which provides only some basic keys like |
| 103 |
|left|, |right|, |top|, |bottom|, |base| and |rotate|. |
| 104 |
|
| 105 |
If |/pgf/text mark as node=true|, \marg{options} is provided as argument to |
| 106 |
|\node|. This means you can provide a very powerful set of options |
| 107 |
including |anchor|, |scale|, |fill|, |draw|, |rounded corners| etc. |
| 108 |
\end{key} |
| 109 |
|
| 110 |
} |
| 111 |
|
| 112 |
|
| 113 |
%%% Local Variables: |
| 114 |
%%% mode: latex |
| 115 |
%%% TeX-master: "pgfmanual-pdftex-version" |
| 116 |
%%% End: |