How to define a custom pgf color palette from a given base color?
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I have a stacked plot with seven plots, and I'm trying to obtain a set of colors that suit with the primary color of the rest of the document.
The code is the following:
documentclassarticle
usepackagepgfplots
usepgfplotslibrarycolorbrewer
pgfplotssetcompat=newest
definecolormyblueRGB95,145,166
begindocument
tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
begintikzpicture
beginaxis[
xbar stacked,
cycle list/Blues-7, cycle list name=Blues-7,
every axis plot/.style=fill
]
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture
enddocument
And its output is:
So the Blue-7 cycle list from color brewer
is the closest that I could find, but the tonality is different and thus wrong.
Is there a way to obtain a 7-color cycle list similar to the XX-7
ones from colorbrewer
but based on my basic blue color shown above? Looking at it, the base color may probably be the darkest of the series.
I'm citing specifically color brewer
because the luminosity difference between different color in the original Blue-7
palette sounds quite right. Anyway, I don't need the colors to be necessarily automatically computed.
pgfplots color
add a comment |Â
up vote
3
down vote
favorite
I have a stacked plot with seven plots, and I'm trying to obtain a set of colors that suit with the primary color of the rest of the document.
The code is the following:
documentclassarticle
usepackagepgfplots
usepgfplotslibrarycolorbrewer
pgfplotssetcompat=newest
definecolormyblueRGB95,145,166
begindocument
tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
begintikzpicture
beginaxis[
xbar stacked,
cycle list/Blues-7, cycle list name=Blues-7,
every axis plot/.style=fill
]
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture
enddocument
And its output is:
So the Blue-7 cycle list from color brewer
is the closest that I could find, but the tonality is different and thus wrong.
Is there a way to obtain a 7-color cycle list similar to the XX-7
ones from colorbrewer
but based on my basic blue color shown above? Looking at it, the base color may probably be the darkest of the series.
I'm citing specifically color brewer
because the luminosity difference between different color in the original Blue-7
palette sounds quite right. Anyway, I don't need the colors to be necessarily automatically computed.
pgfplots color
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have a stacked plot with seven plots, and I'm trying to obtain a set of colors that suit with the primary color of the rest of the document.
The code is the following:
documentclassarticle
usepackagepgfplots
usepgfplotslibrarycolorbrewer
pgfplotssetcompat=newest
definecolormyblueRGB95,145,166
begindocument
tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
begintikzpicture
beginaxis[
xbar stacked,
cycle list/Blues-7, cycle list name=Blues-7,
every axis plot/.style=fill
]
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture
enddocument
And its output is:
So the Blue-7 cycle list from color brewer
is the closest that I could find, but the tonality is different and thus wrong.
Is there a way to obtain a 7-color cycle list similar to the XX-7
ones from colorbrewer
but based on my basic blue color shown above? Looking at it, the base color may probably be the darkest of the series.
I'm citing specifically color brewer
because the luminosity difference between different color in the original Blue-7
palette sounds quite right. Anyway, I don't need the colors to be necessarily automatically computed.
pgfplots color
I have a stacked plot with seven plots, and I'm trying to obtain a set of colors that suit with the primary color of the rest of the document.
The code is the following:
documentclassarticle
usepackagepgfplots
usepgfplotslibrarycolorbrewer
pgfplotssetcompat=newest
definecolormyblueRGB95,145,166
begindocument
tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
begintikzpicture
beginaxis[
xbar stacked,
cycle list/Blues-7, cycle list name=Blues-7,
every axis plot/.style=fill
]
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture
enddocument
And its output is:
So the Blue-7 cycle list from color brewer
is the closest that I could find, but the tonality is different and thus wrong.
Is there a way to obtain a 7-color cycle list similar to the XX-7
ones from colorbrewer
but based on my basic blue color shown above? Looking at it, the base color may probably be the darkest of the series.
I'm citing specifically color brewer
because the luminosity difference between different color in the original Blue-7
palette sounds quite right. Anyway, I don't need the colors to be necessarily automatically computed.
pgfplots color
pgfplots color
asked 4 hours ago
gigabytes
1,3521018
1,3521018
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
You can always define your own things.
documentclassarticle
usepackagepgfplots
usepgfplotslibrarycolorbrewer
pgfplotssetcompat=newest
definecolormyblueRGB95,145,166
begindocument
tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
pgfplotscreateplotcyclelistmy blues%
myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
begintikzpicture
beginaxis[
xbar stacked,
cycle list name=my blues,
every axis plot/.style=fill,
]
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture
enddocument
Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).
Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
â gigabytes
2 hours ago
@gigabytes as for 1) good catch! and as for 2) sure, see my update.
â marmot
2 hours ago
Ah it was so easy! Thanks!
â gigabytes
2 hours ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
You can always define your own things.
documentclassarticle
usepackagepgfplots
usepgfplotslibrarycolorbrewer
pgfplotssetcompat=newest
definecolormyblueRGB95,145,166
begindocument
tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
pgfplotscreateplotcyclelistmy blues%
myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
begintikzpicture
beginaxis[
xbar stacked,
cycle list name=my blues,
every axis plot/.style=fill,
]
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture
enddocument
Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).
Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
â gigabytes
2 hours ago
@gigabytes as for 1) good catch! and as for 2) sure, see my update.
â marmot
2 hours ago
Ah it was so easy! Thanks!
â gigabytes
2 hours ago
add a comment |Â
up vote
3
down vote
accepted
You can always define your own things.
documentclassarticle
usepackagepgfplots
usepgfplotslibrarycolorbrewer
pgfplotssetcompat=newest
definecolormyblueRGB95,145,166
begindocument
tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
pgfplotscreateplotcyclelistmy blues%
myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
begintikzpicture
beginaxis[
xbar stacked,
cycle list name=my blues,
every axis plot/.style=fill,
]
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture
enddocument
Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).
Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
â gigabytes
2 hours ago
@gigabytes as for 1) good catch! and as for 2) sure, see my update.
â marmot
2 hours ago
Ah it was so easy! Thanks!
â gigabytes
2 hours ago
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
You can always define your own things.
documentclassarticle
usepackagepgfplots
usepgfplotslibrarycolorbrewer
pgfplotssetcompat=newest
definecolormyblueRGB95,145,166
begindocument
tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
pgfplotscreateplotcyclelistmy blues%
myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
begintikzpicture
beginaxis[
xbar stacked,
cycle list name=my blues,
every axis plot/.style=fill,
]
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture
enddocument
Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).
You can always define your own things.
documentclassarticle
usepackagepgfplots
usepgfplotslibrarycolorbrewer
pgfplotssetcompat=newest
definecolormyblueRGB95,145,166
begindocument
tikz path node[rectangle, fill=myblue,inner sep=1cm] ;
pgfplotscreateplotcyclelistmy blues%
myblue,myblue!90,myblue!80,myblue!70,myblue!60,myblue!50,myblue!40,myblue!30,myblue!20
begintikzpicture
beginaxis[
xbar stacked,
cycle list name=my blues,
every axis plot/.style=fill,
]
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
first second
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
addplot table
prova colonna
1 5
2 6
3 7
4 8
;
endaxis
endtikzpicture
enddocument
Of course, you could also define the list in a loop (but here copy & paste was even faster ;-).
edited 2 hours ago
answered 2 hours ago
marmot
72.1k477153
72.1k477153
Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
â gigabytes
2 hours ago
@gigabytes as for 1) good catch! and as for 2) sure, see my update.
â marmot
2 hours ago
Ah it was so easy! Thanks!
â gigabytes
2 hours ago
add a comment |Â
Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
â gigabytes
2 hours ago
@gigabytes as for 1) good catch! and as for 2) sure, see my update.
â marmot
2 hours ago
Ah it was so easy! Thanks!
â gigabytes
2 hours ago
Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
â gigabytes
2 hours ago
Thanks, but 1) why calling the Blues-7 key anyway? And 2) can I give a name to the list?
â gigabytes
2 hours ago
@gigabytes as for 1) good catch! and as for 2) sure, see my update.
â marmot
2 hours ago
@gigabytes as for 1) good catch! and as for 2) sure, see my update.
â marmot
2 hours ago
Ah it was so easy! Thanks!
â gigabytes
2 hours ago
Ah it was so easy! Thanks!
â gigabytes
2 hours ago
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458640%2fhow-to-define-a-custom-pgf-color-palette-from-a-given-base-color%23new-answer', 'question_page');
);
Post as a guest
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
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
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