-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mark=ball connects and fills the path #473
Comments
Yes please provide a minimal working example. |
Well, it was trivial to create that. At least easier than to upload it here. Please change the extension to tex. addplot or addplot+ don't make a difference. Regular marks (the red plot) work as expected. \documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\pgfplotsset{
IBD/.style={
color=black,
mark=ball,
ball color=black,
},
MC/.style={
color=red,
mark=*,
mark options={
fill=red,
},
},
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
legend entries={MC,IBD}
]
\addplot [MC] {x^2};
\addplot [IBD] {x^3};
\end{axis}
\end{tikzpicture}
\end{document} |
Thank you for giving me a link to what an MWE is; I think you could add it into a template for new issues. |
The culprit is
In your use case \documentclass[margin=5pt, varwidth]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\begin{axis}
% using inside "mark options"
\addplot [mark=ball, mark options={ball color=red}] {x^2};
% reproducible with just "ball color"
\addplot [ball color=black] {x^3};
\end{axis}
\end{tikzpicture}
% effect of "ball color" on simple un-closed tikz path
\begin{tikzpicture}
\draw[ball color=red] (0,0) -- (1,1) -- (1,0);
\end{tikzpicture}
\end{document} |
Thank you for the clarification. Do you have access to the official manual, why does there have to be an unofficial one? |
The
Like this? --- a/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex
+++ b/doc/latex/pgfplots/pgfplots.reference.markers-meta.tex
@@ -98,7 +98,8 @@ And with |\usetikzlibrary{plotmarks}|:
This marker is special and can easily generate big output files if
there are lots of them. It is also special in that it needs
- |ball color| to be set (in our case, it is |ball color=yellow!80!black|.
+ |ball color| to be set inside |mark options|
+ (in our case, it is |ball color=yellow!80!black|).
\item[mark=text] \showit{mark=text,every mark/.append style={scale=0.5}}
Yes I have access to the official manual in PDF. The unofficial one provides webpage links to sections, commands, and/or options in pgfmanual and pgfplots manual, which may be preferable when referring to them on web. The word "unofficial" doesn't mean the content is unreliable, but only indicates it's not maintained by pgf-tikz team. |
I would say "It is also special in that inside |mark options| it needs |ball color| to be set" (because otherwise people might think that only this option needs to be set inside mark options). I would say that in that section on markers it is not clear that markers should be set within that scope. Moreover, I can see that the option mark color has an example outside of that scope, simply
If I were a developer, I would disallow such syntax (because ball color in the same place is very different). However, it is your choice then. Thank you for clarifications and quick replies! Feel free to close it when you feel appropriate. |
True this reflects some inconsistent design and maybe misleading naming, all inherited from pgf/tikz.
|
I'm creating a simple graph. When I use
my path gets connected (the last and the first points) and filled (which i do not want). When I use the same TeX file with
everything works as expected, and I get a simple graph. I believe markers should not influence the construction of the whole path.
I can provide my whole script if needed.
This behaviour happens to both of my installations of TeXLive, from 2021 and 2023. compat=1.18.
The text was updated successfully, but these errors were encountered: