我的条形图中的所有条形都有黑色轮廓:
我怎样才能去除轮廓或改变它们的颜色?
前 10 个小节左右:
\begin{tikzpicture}
\begin{axis}[
axis lines = center,
axis line style = {-},
xlabel = $$,
ylabel = $$,
xmin = 0,
xmax = 0.001,
clip=false,
xtick = {0, 0.001},
xticklabels = {$0$, $0.001$},
ymin = -0.6,
ymax = 0.6,
ytick = {0.6,0,0.6},
yticklabels = {$0.6$,$0$,$0.6$},
height = 10em,
width = 30em,
]
\addplot [
ybar,
fill=blue,
bar width=0.000005,
]
coordinates {
(0,0.00928)
(0.00002083333,0.23672)
(0.00004166667,0.31467)
(0.0000625,0.58179)
(0.00008333333,0.46774)
(0.0001041667,0.71017)
(0.000125,0.45074)
(0.0001458333,0.61990)
(0.0001666667,0.30692)
(0.0001875,0.41278)
(0.0002083333,0.21576)
(0.0002291667,0.31616)
(0.00025,0.35751)
};
\end{axis}
\end{tikzpicture}
答案1
您可以使用draw=none
:
\documentclass[10pt]{book}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines = center,
axis line style = {-},
xlabel = $$,
ylabel = $$,
xmin = 0,
xmax = 0.001,
clip=false,
xtick = {0, 0.001},
xticklabels = {$0$, $0.001$},
ymin = -0.6,
ymax = 0.6,
ytick = {0.6,0,0.6},
yticklabels = {$0.6$,$0$,$0.6$},
height = 10em,
width = 30em,
]
\addplot [
ybar,
fill=blue,
draw=none,
bar width=0.000005,
]
coordinates {
(0,0.00928)
(0.00002083333,0.23672)
(0.00004166667,0.31467)
(0.0000625,0.58179)
(0.00008333333,0.46774)
(0.0001041667,0.71017)
(0.000125,0.45074)
(0.0001458333,0.61990)
(0.0001666667,0.30692)
(0.0001875,0.41278)
(0.0002083333,0.21576)
(0.0002291667,0.31616)
(0.00025,0.35751)
};
\end{axis}
\end{tikzpicture}
\end{document}