-
Notifications
You must be signed in to change notification settings - Fork 110
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
Plot option smooth
and decorations.markings
#748
Comments
I don't remember touching any decorations or plot code, so if this is a regression it must be really old. |
@hmenke OK, I remove the parentheses. |
This is the plot handler that is used when the pgf/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex Lines 13 to 88 in ee17ca5
|
@hmenke I do not think it is the plot handler but Bezier vs. straight lines. \draw[rotated coordsys at/.list={0.1,0.3,0.5,0.7,0.9}] (-2,-1) to[bend right]
(2,-1); has the same issue. |
Which is kind of the same statement, because the plot handler looks pretty innocent, so it probably comes from |
@hmenke I agree that it is the same thing. All I wanted to say is that it is not the plot handler but the way TikZ switches to the tangent system. And I do not have an old version at hand at the moment. |
I quickly tested with TeX Live 2015 and 2016 and they both exhibit the same broken behaviour as the latest master. |
@hmenke OK, thanks! (I did not see this issue in the various tangent solutions on the TeX-SE site.) |
I just realized that you are using a |
@hmenke Does not seem like it. If you replace the pic by its code , the same issue arises. |
Regarding "old versions": You can find all -- or at least most of them -- on https://sourceforge.net/projects/pgf/files/pgf/. |
Here is your fix. \documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}[
rotated coordsys at/.style={
postaction={
decorate,
decoration={
markings,
mark=at position #1 with {
\pgfslopedattimefalse % <---
\draw (0,0) -- (1,0) node[pos=1.1] {$x$};
\draw (0,0) -- (0,1) node[pos=1.1] {$y$};
}
}
}
}]
\draw[rotated coordsys at/.list={0.1,0.3,0.5,0.7,0.9}] (-2,-1) .. controls (0,-2) .. (2,-1);
\end{tikzpicture}
\end{document} |
Possible patch, please test. diff --git a/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex b/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex
index 9d18797d..23b7ff67 100644
--- a/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex
+++ b/tex/generic/pgf/libraries/decorations/pgflibrarydecorations.markings.code.tex
@@ -89,6 +89,7 @@
\pgfinterruptpath%
\pgfscope%
\let\pgf@lib@dec@mark@marks=\pgfutil@empty%
+ \pgfslopedattimefalse
\pgf@lib@dec@computed@action%
\endpgfscope%
\endpgfinterruptpath% |
This can interfere with decorations.markings where now the node option `sloped' is also inferred implicitly for all nodes.
There is an interesting interplay between the plot option
smooth
anddecorations.marking
(but most likely not only formarkings
decorations). Consider the MWEAs one can see, on the left side, where a nonsmooth plot is employed, the
y
is upright. On the other hand, on the right side where the plot has thesmooth
key, it is not. The difference in behavior is already surprising to me. However, what is worse, I am unable to cure it (other than explicitly computing the rotation angle that rotates it back to upright). I played with the usual suspects liketansform shape
,rotate
,\pgftransformresetnontranslations
in all combinations I could think of but could not fix it.P.S. It does not seem to be related to the usage of a
pic
.has the same issue.
The text was updated successfully, but these errors were encountered: