I started to use this fantastic package "pgfplots", and I would need a little help. In this example taken from the manual (http://ift.tt/1rC5BO7 page 106)
\begin{tikzpicture} \begin{axis}[scatter/classes={
a={mark=square*,blue},%
b={mark=triangle*,red},%
c={mark=o,draw=black}}]
\addplot[scatter,only marks,
scatter src=explicit symbolic]
coordinates {
(0.1,0.15) [a]
(0.45,0.27) [c]
(0.02,0.17) [a]
(0.06,0.1) [a]
(0.9,0.5) [b]
(0.5,0.3) [c]
(0.85,0.52) [b]
(0.12,0.05) [a]
(0.73,0.45) [b]
(0.53,0.25) [c]
(0.76,0.5) [b]
(0.55,0.32) [c]};
\end{axis}
\end{tikzpicture}
three scatter classes are created, a, b, and c, each consisting of a few points. Each has separate mark formatting options and legend entry, which is a great feature. But I haven't found any way to turn certain scatter classes "off".
Is there any easy trick to plot only class "a" or "b"? In principle I'd like to use this meta-data as a selection or filter on the data. It would be extremely useful.
Not naming the scatter class would not help, all the points are still there but unformatted, and I could not find another solution in a reasonable time. If it's not possible with the classes, can such filtering be done in any other way?
Thanks a lot in advance, Anna
Aucun commentaire:
Enregistrer un commentaire