Is there (I'm sure there must be) a way to use meta data for markers?
I have something like the below:
Year coeff meta
2005 1.2183 o
2006 0.1073 star
2007 0.5629 square
2008 1.0168 diamond
2009 -4.4083 otimes
And I'd like a scatter plot that uses meta data for the markers.
Thanks!
Best Answer
You can make the contents of the
meta
column available by addingpoint meta=explicit symbolic
to the\addplot
options, where theexplicit
indicates that the meta data is distinct from the y coordinate (by default, the y coordinate is used as the meta data), and thesymbolic
indicates that the values shouldn't be parsed as numbers.Then you can use the
scatter/@pre marker code
to set themark
depending on the content of themeta
variable: