0

I want to know what's wrong when I change this code, which yields a red star, to a triangle shape: This one works:

\pgfdeclareplotmark{mystar}{
    \node[star,star point ratio=2.25,minimum size=6pt,
    inner sep=0pt,draw=black,solid,fill=red] {};
}

This one, does not work:

\pgfdeclareplotmark{mystar}{
    \node[triangle,triangle point ratio=2.25,minimum size=6pt,
    inner sep=0pt,draw=black,solid,fill=yellow] {};
}

DESIRED OUTPUT:

enter image description here

  • 1
    as fa as i know, triangle hasn't defined point ratio ... you should define it by defined options for triangles. – Zarko Jun 17 at 0:39
  • I've updated the OP – user189304 Jun 17 at 0:41
1

Solved:

\addplot [
    mark=triangle*,
    mark options={fill=yellow},
    line width=0.7pt,
    black, 
    mark size=1.5pt,
]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy