# Custom labeling of contours in Contourplot

I have a Contourplot of F[r,x], which I just wanted to keep some specific contours, however, I wish to label the contours not with their actual numerical values but with some other numbers. So instead of the numerical labels shown below, I wish to label my contour correspondingly with {0.01,0.1,1,3}. What should I do?

ContourPlot[F[r,x],{r,0.5,5},{x,10,40},
Contours->{2Log[0.01],-2Log[0.1],0,-2.19},
ContourLabels->True]


• Do not paste LaTex for code. Paste the code and format with {} button. – Edmund Apr 18 '17 at 20:00

Generally, ContourLabels is a function. So you have to use a function to link labels with their values. It's easy to specify 2 separate lists of labels and corresponding values and the use Association to link them. I use characters for labels for clarity of example, but numbers also can be used, --- as strings or directly. Note this approach has a sound logic in a sense that keys of Association should be unique, and so are the contour values, which are used as keys.
zvalues={.1,.2,.3,.4};