Using the suggestions from this answer, I decided to use \pgfuseplotmark to make marks in my diagram. However, there is some strange white space inserted to the left of the pgfmarks. What should I do to remove it? Here's an MWE:




  \node[draw] at (0,0) {!};
  \node[draw] at (2,0) {\pgfuseplotmark{diamond*}};


Because of the missing % at the end of the plotmark drawing commands in the library. Usually, \pgfuseplotmark is used as a standalone command and not put in the text boxes so the inherent TikZ feature of eating up regular font via \nullfont takes care of it. But it becomes apparent once you put them in text aware places such as the box of a node.

Quick way to fix is

\node[draw] at (2,0) {\nullfont\pgfuseplotmark{diamond*}};

or if you are disturbed deeply and want to have it done properly

  \pgfpathmoveto{\pgfqpoint{0pt}{\pgfplotmarksize}}% <-- These % are missing in the originals
\node[draw] {\pgfuseplotmark{diamond*}};

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.