Dear Joel,
the reason why your code fragment did not work as expected is a slight
misunderstanding: everytime you use a key followed by /.style, you define a
NEW named key. Typically, such a newly defined key is ignored by pgfplots
unless it happens to be one of the predefined styles.
In your case, you have defined a new key called 'bar cycle list'. The
solution to your question is to use
...
\begin{axis}[bar cycle list]
...
or, alternatively, to use the definition
\pgfplotsset{
ybar,
%/pgfplots/bar cycle list/.style={
/pgfplots/cycle list={
{black,fill=gray,mark=none},
{black,fill=gray,mark=none},
{black,fill=gray,mark=none},
},
%},
}
This latter definition is more-or-less equivalent to the approach from
stackexchange.
Best regards
Christian
Am schrieb Joel <jtzzaa11-pgf...@yahoo.com>:
Hello Christian,
I've tried modifying the cycle list for bar plots, but have some issues.
Here is a minimal example:
\documentclass[10pt]{article}
\usepackage{pgfplots}
\begin{document}
\pgfplotsset{
ybar,
/pgfplots/bar cycle list/.style={/pgfplots/cycle list={
{black,fill=gray,mark=none},
{black,fill=gray,mark=none},
{black,fill=gray,mark=none},
}},
}
\begin{tikzpicture}
\begin{axis}
\addplot table[x index=0, y index=0]{f};
\addplot table[x index=0, y index=1]{f};
\addplot table[x index=0, y index=2]{f};
\end{axis}
\end{tikzpicture}
]\end{document}
But this didn't work. Following this webpage,
http://tex.stackexchange.com/questions/34454/set-a-colormap-to-fill-a-bar-plot-using-pgfplots
I've used
\pgfplotscreateplotcyclelist{mylist}{%
{black,fill=gray,mark=none},
{black,fill=gray,mark=none},
{black,fill=gray,mark=none},
}
\pgfplotsset{
cycle list name=mylist,
}
which did work.
So, can you please clarify how to change the cycle list for bar plots?
the manual (pgfplos 1.5) doesn't mention the latter technique in the bar
plots section.
Thanks,
Joel.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features