0

I would like to know how to make an axis identical to the one in the picture with all captions and grids.

enter image description here

I have tried a few ways, but I can't make it. If someone can help me it would be great

1 Answers1

1

I recreated the basics of the default style from Matlab (I'm also a user, so I recognized the style). I let colors in the following example in order to make clear where each style goes. You may change them to black or just remove them.

The key concept is to edit <property> style={keys}. Please check:

to find the font of your preference. I let \fontfamily{phv}\selectfont, as I think Helvetica (almost equal to Arial) is the closest font style. Just change the three letter in \fontfamily to change fontstyle.

If your are willing to plot other functions, check

you may also plot data from tables and external data files.

A MWE follows:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}

\begin{document} \begin{tikzpicture} \begin{axis}[ tick style={grid=major, very thick}, title style={font=\LARGE\fontfamily{phv}\selectfont\bfseries, color=green!50!black}, tick label style={font=\small\fontfamily{phv}\selectfont\bfseries, color=red}, label style={font=\small\fontfamily{phv}\selectfont\bfseries, color=blue}, xmin=0, xmax = 1, ymin=0, ymax = 1, xtick={0,0.1,...,1}, ytick={0,0.1,...,1}, xlabel={1 - espeficidade}, ylabel={Sensibilidade}, title={Title}, ] \addplot[blue, ultra thick] {x}; \end{axis} \end{tikzpicture} \end{document}

enter image description here

FHZ
  • 3,939