# Filled contour from axis symmetric data

I have temperature data which is axis symmetric.(See Figure 1; apologies for my bad drawing) The number(1 to 10) denotes the point of measurement. Now, From this data, how do I get a filled contour like Figure 2 and 3 ? Is it possible in pgfplots?

The last two figures are for representation purpose only.

• did you check the manual? a surf plots might be the closest what you can do with pgfplots Commented May 18, 2016 at 13:21
• Just check this: Commented May 18, 2016 at 13:34
• @Francesco --> tex.stackexchange.com/questions/82425/… Commented May 18, 2016 at 13:40
• Yes @percusse, that's the same. Is what you wanted @SaravanaK? Commented May 18, 2016 at 13:49

You can use contour filled in order to visualize the data and data cs=polar if you need polar coordinates:

\documentclass{standalone}

\usepackage{pgfplots}

\usepgfplotslibrary{colorbrewer}
\pgfplotsset{compat=1.14}

\begin{document}

\begin{tikzpicture}
\begin{axis}[colorbar, colormap/Spectral,view={0}{90}]
domain=0:360,
domain y=0:360,
data cs=polar,
contour filled={number=15},
]
(x,y,{sin(y)});
\end{axis}
\end{tikzpicture}

\end{document}


The key data cs=polar ensures that x is the angle, y the radius, and the z value is chosen as oscillating function in the range -1:1. The provided colormap is a "diverging" scheme of colorbrewer which is quite suitable for the oscillating function here, but you can use any other colormap as well. You can use any kind of input data (including table data) as long as it forms a mesh (i.e. has inherent matrix structure).

\documentclass{standalone}

\usepackage{pgfplots}

\usepgfplotslibrary{colorbrewer}
\pgfplotsset{compat=1.14}

\begin{document}

\begin{tikzpicture}
\begin{axis}[colorbar, xmin=0, ymin=0,colormap/Spectral,view={0}{90}]

Note that contour filled requires pgfplots 1.14 or newer. At the time of this writing, you may need an update first (august 2016).