Change cell color in matrixTikZ change matrix cell color backgroundHow to define the default vertical distance between nodes?Table cell color overlaps cell borderCell color partially overriding cell borderTikZ/ERD: node (=Entity) label on the insideChange Color of Proofhow to change color of matrix bracketChange color of sectionsColor cell in tableColor fraction of table cell
Why is the ladder of the LM always in the dark side of the LM?
Why did Harry Potter get a bedroom?
Is this a reference to the film Alien in the novel 2010 Odyssey Two?
Why did Old English lose both thorn and eth?
Is there a way I can open the Windows 10 Ubuntu bash without running the ~/.bashrc script?
Were Pandaria, Broken Isles, Northrend, Kul'Tiras and Zandalar also affected by the Cataclysm?
Why does wrapping Aluminium foil around my food help it keep warm, aluminium be good conductor should have no effect?
Is system.schedule(...) @AuraEnabled?
The origin of a particular self-reference paradox
What happens when adult Billy Batson says "Shazam"?
What could cause the sea level to massively decrease?
Is it possible to set permissions on schema fields to restrict editing of them to certain users?
How do you move up one folder in Finder?
Should I include code in my research paper?
When an electron changes its spin, or any other intrinsic property, is it still the same electron?
What is the right approach to quit a job during probation period for a competing offer?
To what extent would a wizard be able to combine feats to learn to mimic unknown spells?
What adjective means "accurately representitive of reality"?
Through: how to use it with subtraction of functions?
What the real concept of Static keyword in perspective of Embedded C. See below code
What is the minimum time required for final wash in film development?
Given a 32 bit number, what is an efficient way to scale each byte by a certain factor?
Having decision making power over someone's assets
What is /bin/red
Change cell color in matrix
TikZ change matrix cell color backgroundHow to define the default vertical distance between nodes?Table cell color overlaps cell borderCell color partially overriding cell borderTikZ/ERD: node (=Entity) label on the insideChange Color of Proofhow to change color of matrix bracketChange color of sectionsColor cell in tableColor fraction of table cell
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to color the empty cells from the first matrix with grey (definecolorgreyRGB220,250,250)but I don't know why it does not work. Any suggestions?
documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
definecolorgrisRGB250,250,250
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=grey,
every label/.append style = font=large, text=teal
makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother
usepackagebm
newcommandMatrixVariable[1]bm#1
definecolorblueRGB180, 171, 250
definecolorgreyRGB250,250,250
begindocument
begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]
1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
matrix (m2) [mymatrix=none, right=0.1em of approx,
label=[rotate=90, anchor=south east,xshift=-0.7em,black]left: Movies,
label=[black]below:$MatrixVariableQ$,
label=[black]above:$f$-factors,
nodes=minimum width=2.2em,fill=grey]
0.1& -0.4 & -0.2 \
-0.5& 0.6 & 0.5 \
-0.2& 0.3 &0.5 \
1.1& 2.1 & 0.3 \
-0.7&2.1 & -2 \
-1& 0.7 & 0.3 \
;
node (times) [right=of m2,scale=2] $cdot$;
matrix (m3) [mymatrix=none, right=of times,
label=[rotate=90, anchor=north,black]right: $f$-factors,
label=[black]below:$MatrixVariableP^T$,
label=[black]above:Users,
nodes=minimum width=2em,fill=grey]
1.1&-2 & 0.3 & 0.5 &-2 & -0.5 & 0.8 & -0.4 & 0.3 & 1.4 & 2.4 & -0.9\
-0.8& 0.7 & 0.5 & 1.4 &0.3 & -1 & 1.4 & 2.9 & 0.7 & - 1.2 & 1.3& 0.4\
2.1& -0.4 & 0.6 & 1.7 & 2.4 & 0.9 & -0.3 & 0.4 & 0.8 & 0.7 & -0.6&0.1 \
;
endtikzpicture
enddocument

tikz-pgf color
add a comment |
I am trying to color the empty cells from the first matrix with grey (definecolorgreyRGB220,250,250)but I don't know why it does not work. Any suggestions?
documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
definecolorgrisRGB250,250,250
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=grey,
every label/.append style = font=large, text=teal
makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother
usepackagebm
newcommandMatrixVariable[1]bm#1
definecolorblueRGB180, 171, 250
definecolorgreyRGB250,250,250
begindocument
begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]
1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
matrix (m2) [mymatrix=none, right=0.1em of approx,
label=[rotate=90, anchor=south east,xshift=-0.7em,black]left: Movies,
label=[black]below:$MatrixVariableQ$,
label=[black]above:$f$-factors,
nodes=minimum width=2.2em,fill=grey]
0.1& -0.4 & -0.2 \
-0.5& 0.6 & 0.5 \
-0.2& 0.3 &0.5 \
1.1& 2.1 & 0.3 \
-0.7&2.1 & -2 \
-1& 0.7 & 0.3 \
;
node (times) [right=of m2,scale=2] $cdot$;
matrix (m3) [mymatrix=none, right=of times,
label=[rotate=90, anchor=north,black]right: $f$-factors,
label=[black]below:$MatrixVariableP^T$,
label=[black]above:Users,
nodes=minimum width=2em,fill=grey]
1.1&-2 & 0.3 & 0.5 &-2 & -0.5 & 0.8 & -0.4 & 0.3 & 1.4 & 2.4 & -0.9\
-0.8& 0.7 & 0.5 & 1.4 &0.3 & -1 & 1.4 & 2.9 & 0.7 & - 1.2 & 1.3& 0.4\
2.1& -0.4 & 0.6 & 1.7 & 2.4 & 0.9 & -0.3 & 0.4 & 0.8 & 0.7 & -0.6&0.1 \
;
endtikzpicture
enddocument

tikz-pgf color
add a comment |
I am trying to color the empty cells from the first matrix with grey (definecolorgreyRGB220,250,250)but I don't know why it does not work. Any suggestions?
documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
definecolorgrisRGB250,250,250
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=grey,
every label/.append style = font=large, text=teal
makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother
usepackagebm
newcommandMatrixVariable[1]bm#1
definecolorblueRGB180, 171, 250
definecolorgreyRGB250,250,250
begindocument
begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]
1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
matrix (m2) [mymatrix=none, right=0.1em of approx,
label=[rotate=90, anchor=south east,xshift=-0.7em,black]left: Movies,
label=[black]below:$MatrixVariableQ$,
label=[black]above:$f$-factors,
nodes=minimum width=2.2em,fill=grey]
0.1& -0.4 & -0.2 \
-0.5& 0.6 & 0.5 \
-0.2& 0.3 &0.5 \
1.1& 2.1 & 0.3 \
-0.7&2.1 & -2 \
-1& 0.7 & 0.3 \
;
node (times) [right=of m2,scale=2] $cdot$;
matrix (m3) [mymatrix=none, right=of times,
label=[rotate=90, anchor=north,black]right: $f$-factors,
label=[black]below:$MatrixVariableP^T$,
label=[black]above:Users,
nodes=minimum width=2em,fill=grey]
1.1&-2 & 0.3 & 0.5 &-2 & -0.5 & 0.8 & -0.4 & 0.3 & 1.4 & 2.4 & -0.9\
-0.8& 0.7 & 0.5 & 1.4 &0.3 & -1 & 1.4 & 2.9 & 0.7 & - 1.2 & 1.3& 0.4\
2.1& -0.4 & 0.6 & 1.7 & 2.4 & 0.9 & -0.3 & 0.4 & 0.8 & 0.7 & -0.6&0.1 \
;
endtikzpicture
enddocument

tikz-pgf color
I am trying to color the empty cells from the first matrix with grey (definecolorgreyRGB220,250,250)but I don't know why it does not work. Any suggestions?
documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
definecolorgrisRGB250,250,250
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=grey,
every label/.append style = font=large, text=teal
makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother
usepackagebm
newcommandMatrixVariable[1]bm#1
definecolorblueRGB180, 171, 250
definecolorgreyRGB250,250,250
begindocument
begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]
1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
matrix (m2) [mymatrix=none, right=0.1em of approx,
label=[rotate=90, anchor=south east,xshift=-0.7em,black]left: Movies,
label=[black]below:$MatrixVariableQ$,
label=[black]above:$f$-factors,
nodes=minimum width=2.2em,fill=grey]
0.1& -0.4 & -0.2 \
-0.5& 0.6 & 0.5 \
-0.2& 0.3 &0.5 \
1.1& 2.1 & 0.3 \
-0.7&2.1 & -2 \
-1& 0.7 & 0.3 \
;
node (times) [right=of m2,scale=2] $cdot$;
matrix (m3) [mymatrix=none, right=of times,
label=[rotate=90, anchor=north,black]right: $f$-factors,
label=[black]below:$MatrixVariableP^T$,
label=[black]above:Users,
nodes=minimum width=2em,fill=grey]
1.1&-2 & 0.3 & 0.5 &-2 & -0.5 & 0.8 & -0.4 & 0.3 & 1.4 & 2.4 & -0.9\
-0.8& 0.7 & 0.5 & 1.4 &0.3 & -1 & 1.4 & 2.9 & 0.7 & - 1.2 & 1.3& 0.4\
2.1& -0.4 & 0.6 & 1.7 & 2.4 & 0.9 & -0.3 & 0.4 & 0.8 & 0.7 & -0.6&0.1 \
;
endtikzpicture
enddocument

tikz-pgf color
tikz-pgf color
edited 7 hours ago
NaveganTeX
asked 8 hours ago
NaveganTeXNaveganTeX
1,0391 silver badge10 bronze badges
1,0391 silver badge10 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can just replace grey by gray in the tikzset of your empty nodes.
documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=gray,
every label/.append style = font=large, text=teal
makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother
usepackagebm
newcommandMatrixVariable[1]bm#1
definecolorblueRGB180, 171, 250
begindocument
begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]
1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
endtikzpicture
enddocument
to get:

Note: The triple
RGB=250,250,250will result in white color.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f499114%2fchange-cell-color-in-matrix%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can just replace grey by gray in the tikzset of your empty nodes.
documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=gray,
every label/.append style = font=large, text=teal
makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother
usepackagebm
newcommandMatrixVariable[1]bm#1
definecolorblueRGB180, 171, 250
begindocument
begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]
1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
endtikzpicture
enddocument
to get:

Note: The triple
RGB=250,250,250will result in white color.
add a comment |
You can just replace grey by gray in the tikzset of your empty nodes.
documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=gray,
every label/.append style = font=large, text=teal
makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother
usepackagebm
newcommandMatrixVariable[1]bm#1
definecolorblueRGB180, 171, 250
begindocument
begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]
1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
endtikzpicture
enddocument
to get:

Note: The triple
RGB=250,250,250will result in white color.
add a comment |
You can just replace grey by gray in the tikzset of your empty nodes.
documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=gray,
every label/.append style = font=large, text=teal
makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother
usepackagebm
newcommandMatrixVariable[1]bm#1
definecolorblueRGB180, 171, 250
begindocument
begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]
1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
endtikzpicture
enddocument
to get:

Note: The triple
RGB=250,250,250will result in white color.
You can just replace grey by gray in the tikzset of your empty nodes.
documentclassstandalone
%usepackage[showframe]geometry
usepackagetikz
usepackagelmodern
usetikzlibrarymatrix,
positioning
tikzset
mymatrix/.style = matrix of nodes,
nodes in empty cells,
nodes=minimum height=3ex, minimum width=1em,
inner sep=0pt, outer sep=0pt, anchor=center,
draw, very thin,scale=0.8,transform shape,
column sep=0pt,
row sep=0pt,
inner sep=0.5pgflinewidth, outer sep=1pt,
draw, thick,
empty node/.style = draw,fill=gray,
every label/.append style = font=large, text=teal
makeatletter
deftikz@lib@matrix@empty@cell%
iftikz@lib@matrix@empty%
node[name=tikzmatrixname-thepgfmatrixcurrentrow-thepgfmatrixcurrentcolumn,empty node];fi
makeatother
usepackagebm
newcommandMatrixVariable[1]bm#1
definecolorblueRGB180, 171, 250
begindocument
begintikzpicture[node distance=0pt,scale=0.6,nodes=transform
shape]
matrix (m1) [mymatrix,
label=[rotate=90, anchor=south,black]left: Movies,
label=[black]below:$MatrixVariableR$,
label=[black]above:Users,
nodes=fill=blue]
1 & & 3 & & & 5 & & & 5 & & 4 & \
& & 5 & 4 & & & 4 & & & 2 & 1 & 3 \
2 & 4 & & 1 & 2 & & 3 & & 4 & 3 & 5 & \
& 2 & 4 & & 5 & & & 4 & & & 2 & \
& & 4 & 3 & 4 & 2 & & & & & 2 & 5 \
1 & & 3 & & 3 & & & 2 & & & 4 & \
;
node (approx) [right=of m1,scale=2] $approx$;
endtikzpicture
enddocument
to get:

Note: The triple
RGB=250,250,250will result in white color.
answered 7 hours ago
RaajaRaaja
5,5183 gold badges18 silver badges45 bronze badges
5,5183 gold badges18 silver badges45 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f499114%2fchange-cell-color-in-matrix%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown