0
$\begingroup$

I have plot

 DensityPlot[100*Exp[-x^2 - y^2], {x, -2, 2}, {y, -2, 2}, PlotLegends -> {Automatic}]

I wanna see the PlotLegend only in range 0 to 10. How do it?

$\endgroup$
  • $\begingroup$ do you get what you need using PlotLegends -> BarLegend[{Automatic, {0, 10}}]? $\endgroup$ – kglr May 3 '18 at 11:02
  • $\begingroup$ .. or using PlotLegends ->BarLegend[{Blend["M10DefaultDensityGradient", Rescale[#, {0,100}]]&, {0,10}}]? $\endgroup$ – kglr May 3 '18 at 11:19

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.