增加图形线条的粗细,大于超粗

增加图形线条的粗细,大于超粗

我有一个带有一些 pgfplots 图表的 Beamer 演示文稿,我想增加它们的厚度。我找到了这个答案如何增加图形线条的粗细以及去除点?,但我发现超厚不够厚,而且我没有足够的代表来评论。

我的问题是:有没有办法增加图形线条的粗细,以获得比超厚选项?

\documentclass[10pt]{beamer}

\usetheme[progressbar=frametitle, background=dark]{metropolis}
\usepackage{appendixnumberbeamer}

\usepackage{pgfplots}

\usepackage{xspace}
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{subcaption}
\usepackage{tikz}

\pgfplotsset{compat=1.8}
\usepgfplotslibrary{statistics}

\definecolor{darkgreen}{rgb}{0.05,0.5,0.}
\definecolor{lightgray}{RGB}{50, 60, 60}
\definecolor{pitchblack}{RGB}{0, 0, 0}
\definecolor{lightbeige}{RGB}{255, 251, 241}
\definecolor{mediumgray}{RGB}{200, 200, 200}

\setbeamercolor{background canvas}{bg=pitchblack}
\setbeamercolor{normal text}{fg=lightbeige}
\setbeamercolor{frametitle}{bg=lightgray, fg=mediumgray}

\begin{document}

\begin{frame}[fragile]
\frametitle{Details}

\begin{tikzpicture}[>=latex, scale=0.5]
\begin{axis}[
    name=ax1,
    legend entries={AAA, BBB, CCC, DDD},
    legend style={at={(1.12,-0.55)},anchor=south, fill=black, font=\Large},
    ymode = log,
    width={\linewidth},
    xtick={0,500,...,3000},
    xlabel={{XXX}},
    ylabel={{YYY}},
    x label style={at={(axis description cs:0.5,-0.08)},anchor=north, font=\Large},
    y label style={at={(axis description cs:0,1.03)},rotate=-90,anchor=south, font=\Large},
    xmin= 100,
    xmax=3000,
    ymin=500,
    ymax=25000,
    every axis plot/.append style={ultra thick}
  ]

\addplot+ [mark=*, mark options={scale=.5}] table {
186 3153
218 2906
492 1573
678 1253
1082 1020
1609 881
2184 695
3957 480
};

\addplot+ [mark=*, mark options={scale=.5}] table {
193 3464
279 2684
514 1576
810 1218
1245 1007
1827 883
2826 707
5429 508
};

\addplot+ [mark=star, mark options={scale=.5}, color=darkgreen] table {
186 29407
218 26208
492 18350
678 14339
1082 13045
1609 8245
2184 6257
3957 3934
};

\addplot+ [mark=star, mark options={scale=.5}, white] table {
186 28637
218 25286
492 17667
678 13855
1082 12837
1609 7909
2184 5904
3957 3806
};
\legend{}
\end{axis}

\end{tikzpicture}

\end{frame}

\end{document}

答案1

使用line width选项就可以完成这个工作。

\documentclass[tikz]{standalone}
\RequirePackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot+[ultra thick, , mark=none] coordinates {(0,1.5) (1,1.5)};
\addplot+[line width=10pt, mark=none] coordinates {(0,0.5) (1,0.5)};
\end{axis}
\end{tikzpicture}

\end{document}

要得到:

在此处输入图片描述

相关内容