20

I have a beamer presentation with some pgfplots graphs and want to increase their thickness. I found this answer How to increase the thickness of the graph lines and remove the point?, but I found ultra thick not thick enough and I do not have enough rep. to comment.

My question is: is there a way to increase the thickness of graph lines to obtain lines larger than with the ultra thick option?

\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 Answer 1

20

Using line width option would do the job.

\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}

to get:

enter image description here

5
  • 1
    wow thank you, I didn't thought it was that simple!
    – belitd
    Commented Mar 15, 2019 at 9:16
  • @belitd if you find the answer useful, consider accepting it. And, you are welcome! Commented Mar 15, 2019 at 9:17
  • 1
    of course, bu I need to wait 3 minutes ^^
    – belitd
    Commented Mar 15, 2019 at 9:20
  • 3
    @belitd Didnt knew of such a constraint :D sorry. Commented Mar 15, 2019 at 9:21
  • 5 years later, still a useful answer! (and it's a crime this wasn't the top answer when googling)
    – Joris
    Commented Apr 16 at 13:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .