1

Many thanks to Harish Kumar for getting me this far. He made an immense difference with a single character here :)

I have a contour plot that is, to be frank, ugly. The surface it was generated from was not very smooth. In the picture below, it's (obviously) the one on the right

enter image description here

I've been looking for a way to reduce the number of labels, and the closest I've found is this solution...but it doesn't get me there.

The code to produce the plots is below. The data files can be found on pastebin. CAG_Contour.dat is here and PPR_Contour.dat is here

\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{pgfplots.groupplots}

\pgfplotsset{compat = 1.12}

\begin{document}
\begin{figure}
    \centering
    \begin{tikzpicture}
        \begin{groupplot}[
            group style={
                group size=2 by 1,
                xlabels at=edge bottom,
                ylabels at=edge left},
                xlabel = {\footnotesize $\alpha_{++}$},
                ylabel = {\footnotesize Departure Rate}]
            \nextgroupplot[title={\scriptsize Come and Go}]
                \addplot[contour/draw color=black, 
                         contour/label distance=125pt, 
                                 contour/every contour label/.append style={every node/.style={black!50,fill=white}},
                                 contour prepared, 
                                 contour prepared format=matlab]
                         table {CAG_Contour.dat};
            \nextgroupplot[title={\scriptsize ++Resources}]
                \addplot[contour/draw color=black, 
                         contour/label distance=400pt, 
                                 contour/every contour label/.append style={every node/.style={black!50,fill=white}},
                                 contour prepared, contour prepared format=matlab]
                         table {PPR_Contour.dat};
        \end{groupplot}
    \end{tikzpicture}
\end{figure}
\end{document}

If anyone has any suggestions for how to improve the appearance of the contour plot on the right I would be very grateful.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.