Change the color of two consequence bars
I have a bar chart where the first bar of each of two bars have the same color and the same for the second bar. The bar chart I have is the following:
The code to produce it is:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage[margin=0.5in]{geometry}
usepackage{pgfplots}
usepackage{float}
pgfplotsset{compat=1.10}
definecolor{RYB2}{RGB}{245,245,245}%AAAAAAAAAAAAAAA
definecolor{RYB1}{RGB}{218,232,252}%
definecolor{RYB3}{RGB}{252,252,252}%
definecolor{RYB4}{RGB}{108,142,191}%AAAAAAAAAAAA AAAAAAAAAAAA
definecolor{RYB5}{RGB}{85, 114, 155}%
definecolor{RYB6}{RGB}{67, 94, 132}%
begin{document}
begin{figure}[htb]
centering
begin{tikzpicture}
begin{axis}[symbolic x coords={alg1,, alg2,,alg3,, alg4},
xticklabel style={rotate=45,anchor=north east},
xtick={alg1,, alg2,,alg3,, alg4},
ylabel=Measure(%),
ymajorgrids,
bar width=17pt,ybar,enlargelimits=0.1
]
addplot[fill=RYB1] coordinates {(alg1,44.71)
(alg2,26.57) (alg3,37.57) (alg4,39.57)};
addplot[fill=RYB4] coordinates {(alg1,24.71)
(alg2,16.57) (alg3,27.57) (alg4,59.57)};
end{axis}
end{tikzpicture}
caption{Figure name}
label{fig:results_1}
end{figure}
end{document}
Is there a way to make each two bar charts have the same color?
Thank you
tikz-pgf bar-chart charts bar
New contributor
add a comment |
I have a bar chart where the first bar of each of two bars have the same color and the same for the second bar. The bar chart I have is the following:
The code to produce it is:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage[margin=0.5in]{geometry}
usepackage{pgfplots}
usepackage{float}
pgfplotsset{compat=1.10}
definecolor{RYB2}{RGB}{245,245,245}%AAAAAAAAAAAAAAA
definecolor{RYB1}{RGB}{218,232,252}%
definecolor{RYB3}{RGB}{252,252,252}%
definecolor{RYB4}{RGB}{108,142,191}%AAAAAAAAAAAA AAAAAAAAAAAA
definecolor{RYB5}{RGB}{85, 114, 155}%
definecolor{RYB6}{RGB}{67, 94, 132}%
begin{document}
begin{figure}[htb]
centering
begin{tikzpicture}
begin{axis}[symbolic x coords={alg1,, alg2,,alg3,, alg4},
xticklabel style={rotate=45,anchor=north east},
xtick={alg1,, alg2,,alg3,, alg4},
ylabel=Measure(%),
ymajorgrids,
bar width=17pt,ybar,enlargelimits=0.1
]
addplot[fill=RYB1] coordinates {(alg1,44.71)
(alg2,26.57) (alg3,37.57) (alg4,39.57)};
addplot[fill=RYB4] coordinates {(alg1,24.71)
(alg2,16.57) (alg3,27.57) (alg4,59.57)};
end{axis}
end{tikzpicture}
caption{Figure name}
label{fig:results_1}
end{figure}
end{document}
Is there a way to make each two bar charts have the same color?
Thank you
tikz-pgf bar-chart charts bar
New contributor
Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?
– marmot
11 mins ago
add a comment |
I have a bar chart where the first bar of each of two bars have the same color and the same for the second bar. The bar chart I have is the following:
The code to produce it is:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage[margin=0.5in]{geometry}
usepackage{pgfplots}
usepackage{float}
pgfplotsset{compat=1.10}
definecolor{RYB2}{RGB}{245,245,245}%AAAAAAAAAAAAAAA
definecolor{RYB1}{RGB}{218,232,252}%
definecolor{RYB3}{RGB}{252,252,252}%
definecolor{RYB4}{RGB}{108,142,191}%AAAAAAAAAAAA AAAAAAAAAAAA
definecolor{RYB5}{RGB}{85, 114, 155}%
definecolor{RYB6}{RGB}{67, 94, 132}%
begin{document}
begin{figure}[htb]
centering
begin{tikzpicture}
begin{axis}[symbolic x coords={alg1,, alg2,,alg3,, alg4},
xticklabel style={rotate=45,anchor=north east},
xtick={alg1,, alg2,,alg3,, alg4},
ylabel=Measure(%),
ymajorgrids,
bar width=17pt,ybar,enlargelimits=0.1
]
addplot[fill=RYB1] coordinates {(alg1,44.71)
(alg2,26.57) (alg3,37.57) (alg4,39.57)};
addplot[fill=RYB4] coordinates {(alg1,24.71)
(alg2,16.57) (alg3,27.57) (alg4,59.57)};
end{axis}
end{tikzpicture}
caption{Figure name}
label{fig:results_1}
end{figure}
end{document}
Is there a way to make each two bar charts have the same color?
Thank you
tikz-pgf bar-chart charts bar
New contributor
I have a bar chart where the first bar of each of two bars have the same color and the same for the second bar. The bar chart I have is the following:
The code to produce it is:
documentclass{article}
usepackage[utf8]{inputenc}
usepackage[margin=0.5in]{geometry}
usepackage{pgfplots}
usepackage{float}
pgfplotsset{compat=1.10}
definecolor{RYB2}{RGB}{245,245,245}%AAAAAAAAAAAAAAA
definecolor{RYB1}{RGB}{218,232,252}%
definecolor{RYB3}{RGB}{252,252,252}%
definecolor{RYB4}{RGB}{108,142,191}%AAAAAAAAAAAA AAAAAAAAAAAA
definecolor{RYB5}{RGB}{85, 114, 155}%
definecolor{RYB6}{RGB}{67, 94, 132}%
begin{document}
begin{figure}[htb]
centering
begin{tikzpicture}
begin{axis}[symbolic x coords={alg1,, alg2,,alg3,, alg4},
xticklabel style={rotate=45,anchor=north east},
xtick={alg1,, alg2,,alg3,, alg4},
ylabel=Measure(%),
ymajorgrids,
bar width=17pt,ybar,enlargelimits=0.1
]
addplot[fill=RYB1] coordinates {(alg1,44.71)
(alg2,26.57) (alg3,37.57) (alg4,39.57)};
addplot[fill=RYB4] coordinates {(alg1,24.71)
(alg2,16.57) (alg3,27.57) (alg4,59.57)};
end{axis}
end{tikzpicture}
caption{Figure name}
label{fig:results_1}
end{figure}
end{document}
Is there a way to make each two bar charts have the same color?
Thank you
tikz-pgf bar-chart charts bar
tikz-pgf bar-chart charts bar
New contributor
New contributor
New contributor
asked 14 mins ago
CS StudentCS Student
62
62
New contributor
New contributor
Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?
– marmot
11 mins ago
add a comment |
Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?
– marmot
11 mins ago
Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?
– marmot
11 mins ago
Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?
– marmot
11 mins ago
add a comment |
0
active
oldest
votes
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
});
}
});
CS Student is a new contributor. Be nice, and check out our Code of Conduct.
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%2f475280%2fchange-the-color-of-two-consequence-bars%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
CS Student is a new contributor. Be nice, and check out our Code of Conduct.
CS Student is a new contributor. Be nice, and check out our Code of Conduct.
CS Student is a new contributor. Be nice, and check out our Code of Conduct.
CS Student is a new contributor. Be nice, and check out our Code of Conduct.
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%2f475280%2fchange-the-color-of-two-consequence-bars%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
Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?
– marmot
11 mins ago