Skip to content
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

[fillbetween] gives odd placement of axis environment when tikzpicture is scaled #153

Open
pgf-tikz-bot opened this issue Feb 14, 2017 · 7 comments

Comments

@pgf-tikz-bot
Copy link
Collaborator

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/153/
Author: mo-gul
Timestamp: 2017-02-14 21:25:50.705000

Please have a look at http://tex.stackexchange.com/questions/353906 and my corresponding answer for the details of the bug (and a workaround).

It seems that this is not only related to fillbetween. Please also have a look at http://tex.stackexchange.com/questions/357733 and my corresponding answer.

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/153/#7776
Author: cfeuersaenger
Timestamp: 2017-12-22 16:04:03.125000

The problem of https://tex.stackexchange.com/questions/353906/graphics-tikz-picture-placed-incorrectly-when-drawing-areas-between-curves can be reduced to the following minimal example.

The connection between the two examples comes from the fact that "fill between" invokes "set layers" which, in turn, invokes "cell picture=false".

\documentclass{article}

\usepackage{pgfplots}

\pgfplotsset{compat=1.15}

\begin{document}
The box for the tikzpicture appears to be much higher than it should be.\\
\begin{tikzpicture}[scale=0.75]
\pgfplotsset{cell picture=false}
\begin{axis}
\addplot {x};
\end{axis}
\end{tikzpicture}
\end{document}


@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/153/#b8a6
Author: cfeuersaenger
Timestamp: 2017-12-22 16:09:41.762000

drawing and \fbox around this picture shows that the bounding box is plain wrong.

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/153/#e1d1
Author: cfeuersaenger
Timestamp: 2017-12-22 16:40:03.005000

  • status: open --> pending

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/153/#f537
Author: cfeuersaenger
Timestamp: 2017-12-22 16:40:03.193000

I have addressed this issue. I will test it in the next days (unless you are faster, @ Stefan)

This issue occurs whenever cell picture=false was in effect. This is true whenever you use set layers (which is also the case for fill between).

I am unaware of other use-cases involved cell picture=false.

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/153/#981f
Author: cfeuersaenger
Timestamp: 2017-12-22 16:41:16.596000

Side-note: I am wondering if cell picture=false should become the default... in this case, scale=0.5 does not scale font sizes and the entire integration into the tikzpicture is deeper and more natural.

I remember that I hesitated to do... there is a risk of regressions.

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/153/#0d59
Author: cfeuersaenger
Timestamp: 2017-12-23 11:38:51.399000

there is a different issue of this sort: see https://sourceforge.net/p/pgfplots/bugs/199/ . apparently, the bounding box does not reflect shifts.

@pgf-tikz-bot
Copy link
Collaborator Author

Migrated from SourceForge
https://sourceforge.net/p/pgfplots/bugs/153/#7602
Author: cfeuersaenger
Timestamp: 2017-12-23 12:22:58.039000

I have experimented with fixes for bug 199 as well, but there is more to it: adding rotate=90, for example, breaks all my attempts.

I believe that the current approach to define the bounding box and all anchors after the paths is necessary for cell picture=true but is inherently wrong for cell picture=false. An attempt to change this failed, though -- I will need to think about it in more depth. That transformation matrix stuff is confusing.

pgf-tikz-bot pushed a commit that referenced this issue Feb 16, 2020
if \begin{tikzpicture}[scale=XX] and 'cell picture=false' was in
effect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant