Change the color of two consequence bars












0















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:



enter image description here



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










share|improve this question







New contributor




CS Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?

    – marmot
    10 mins ago
















0















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:



enter image description here



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










share|improve this question







New contributor




CS Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?

    – marmot
    10 mins ago














0












0








0








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:



enter image description here



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










share|improve this question







New contributor




CS Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












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:



enter image description here



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






share|improve this question







New contributor




CS Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




CS Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




CS Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 14 mins ago









CS StudentCS Student

62




62




New contributor




CS Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





CS Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






CS Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?

    – marmot
    10 mins ago



















  • Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?

    – marmot
    10 mins ago

















Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?

– marmot
10 mins ago





Isn't the code just taken from tex.stackexchange.com/a/475134/121799 ?

– marmot
10 mins ago










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.










draft saved

draft discarded


















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.










draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)