Tag Info

New answers tagged

2

Here is what I think is going on with the second argument to ContourLabel. Everything starts with the fact that ContourPlot has Attribute of HoldAll, which means that all the options you give it can be parsed in a non-standard way before being evaluated. This seems to be happening in the ContourLabels option: it is scanned for the appearance of Tooltip, ...


3

The solution below seems to work for me from within ContourPlot, using the ContourLabels option: ContourPlot[ Exp[-x^2 - y^2], {x, 0, 2}, {y, 0, 2}, PlotRange -> Full, Contours -> 10^Range[-4, 0, 0.1], ContourLabels -> {None, Tooltip[#3, DisplayForm[SuperscriptBox[10, Log[10, #2]]]] &} ] The key piece of information is the fact that ...


3

Hat-tip to DrMajorBob for this handy workaround: ContourPlot[ Exp[-x^2 - y^2] , {x, 0, 2}, {y, 0, 2} , PlotRange -> Full , Contours -> 10^Range[-4, 0, 0.1] ] /. {Tooltip[expr_, tooltip_] :> Tooltip[expr, DisplayForm[SuperscriptBox[10, Log[10, tooltip]]] ]} This uses the fact that Tooltip'd expressions have a very ...



Top 50 recent answers are included