1

I have the following example plot. I want to scale up the X and Y axis ticks and labels. I want to add the image to a poster where I will resize it. The plot line remains big enough, but the axis information becomes too small, so I just want to increase the font-size or the scale of the font on the axis. Is this somehow possible? I attached my plot as MWE.

enter image description here

\documentclass{article}

\usepackage{pgfplots, pgfplotstable}    


\usepackage{tikz}


\begin{document}
\pagenumbering{gobble}% Remove page numbers (and reset to 1)
\clearpage
\thispagestyle{empty}

\definecolor{amethyst}{rgb}{0.6, 0.2, 1.0}


\begin{figure}
\begin{tikzpicture}
        \begin{axis}[
          ymin=20,
          ymax=90,
          width=15cm,
          height=7cm,
          ylabel=MyYlable,
          xlabel={MyXlable},
          xticklabels={10,,,,50,100}, 
          legend style={at={(0.03,0.1)},
          anchor=west, legend columns=-1, font=\small},
          legend cell align=left,
          xtick=data
         ]

\addlegendentry{abc}
\addplot[blue, mark=+] coordinates {
    (10, 20)
    (20, 40.8)
    (30, 50.0)
    (40, 40.9)
    (50, 60.0)
    (100, 85.2)

};


\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}

1 Answer 1

2

You can adjust the font size for all nodes in a tikzpicture with every node/.append style, or you can modify the different styles for ticklabels, axis labels and legends in the axis. Both options are demonstrated below.

\documentclass{article}
\usepackage{pgfplots, pgfplotstable}    

\begin{document}
\pagenumbering{gobble}% Remove page numbers (and reset to 1)
\clearpage
\thispagestyle{empty}

\definecolor{amethyst}{rgb}{0.6, 0.2, 1.0}

\begin{tikzpicture}[every node/.append style={font=\huge}]
        \begin{axis}[
          ymin=20,
          ymax=90,
          width=15cm,
          height=7cm,
          ylabel=MyYlable,
          xlabel={MyXlable},
          xticklabels={10,,,,50,100}, 
          legend style={at={(0.03,0.1)},
          anchor=west, legend columns=-1, font=\small},
          legend cell align=left,
          xtick=data
         ]

\addlegendentry{abc}
\addplot[blue, mark=+] coordinates {
    (10, 20)
    (20, 40.8)
    (30, 50.0)
    (40, 40.9)
    (50, 60.0)
    (100, 85.2)

};


\end{axis}
\end{tikzpicture}

\begin{tikzpicture}
        \begin{axis}[
          ymin=20,
          ymax=90,
          width=15cm,
          height=7cm,
          ylabel=MyYlable,
          xlabel={MyXlable},
          xticklabels={10,,,,50,100}, 
          legend style={at={(0.03,0.1)},
          anchor=west, legend columns=-1, font=\large},% <-- changed \small to \large
          legend cell align=left,
          xtick=data,
          ticklabel style={font=\huge}, % <-- added
          every axis label/.append style={font=\large} % <-- added
         ]

\addlegendentry{abc}
\addplot[blue, mark=+] coordinates {
    (10, 20)
    (20, 40.8)
    (30, 50.0)
    (40, 40.9)
    (50, 60.0)
    (100, 85.2)

};


\end{axis}
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

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