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

[matrix] create a style that only applied to the outer matrix node #627

Closed
pgf-tikz-bot opened this issue Feb 2, 2017 · 1 comment
Closed

Comments

@pgf-tikz-bot
Copy link

pgf-tikz-bot commented Feb 2, 2017

Migrated from SourceForge
Author: mo-gul
Timestamp: 2017-02-02 09:52:20.936000

It would be great if it could be added a style that is only applied to the outer matrix node and does not affect the "cell" nodes inside the matrix. So far one has to "reset" the style for the cell nodes if a style has been applied to the outer matrix node.

\documentclass[border=5pt]{standalone}
\usepackage{tikz}
    \usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}[
%        % this affects also the "cell" nodes
%        every matrix/.append style={
%            blue,
%            draw,
%            line width=1.5pt,
%        },
]
    \matrix [
%        % here it is the same
%        every matrix/.append style={
            blue,
            draw,
            line width=1.5pt,
%        },
    ] {
        % this node should (just) be shown in black with a black border with
        % the default line width (because it isn't changed somewhere else here)
        \node [draw] {test}; \\
    };
\end{tikzpicture}
\end{document}
@pgf-tikz-bot
Copy link
Author

Migrated from SourceForge
Author: mo-gul
Timestamp: 2017-02-02 09:55:44.873000

For the record:
If this style is implemented, adapt the legend node in PGFPlots accordingly.

(Related:

@hmenke hmenke removed the open label Apr 2, 2019
hmenke added a commit to hmenke/pgf that referenced this issue Nov 5, 2019
This is a bit ugly because it uses a callback.  The proper way would
have been to separate \pgfmatrix into \pgfcollectmatrix and
\pgfplacematrix, but we cannot break the API because this command is so
old and widely used.
@hmenke hmenke closed this as completed Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants