8

I have created this plot with tikz

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}

\begin{document}
 \begin{tikzpicture}[scale=0.9]
     \begin{axis}[
    xlabel=$\alpha$,
    ylabel=$\beta$]
    \addplot[smooth,mark=*,blue] plot coordinates {
(190.728393646,196.570620518) (160.02707719,175.430559421) (164.125220206,182.103291039) (176.15829007,177.090660212) (187.341046916,176.087180673) (193.821169011,174.354254307) (176.904045293,197.933268209) (181.069040516,169.025260202) 
    };
     \addplot[smooth,mark=*,red] plot coordinates {
    (190.728393646,196.570620518) (180.588633071,193.390056336) (183.404873834,179.52351824) (173.721786053,184.741768818) (174.727003532,170.598902591) (190.579518039,183.334835567) (193.020394587,189.098640907) (176.298883572,184.158520273) 
    };
    \end{axis}

            \end{tikzpicture} 
\end{document}

I would like to change the labeling of the axis. Instead of 190 I would rather have 190° and so on. Is there an easy way to achive that?

1

1 Answer 1

8

Adding the options

xticklabel={$\pgfmathprintnumber{\tick}^\circ$},
yticklabel={$\pgfmathprintnumber{\tick}^\circ$}

to your axis environment leads to:

enter image description here

You must log in to answer this question.

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