I would like to get label in BarLegend[{"TemperatureMap", {-Pi/2, Pi/2}}]
to be from -90 °
to 90 °
. Kindly see figure below.
$\begingroup$
$\endgroup$
$\begingroup$
$\endgroup$
ticks = Transpose@{Range[-90, 90, 45], Range[-90 Degree, 90 Degree, 45 Degree]};
legend = BarLegend[{ColorData[{"TemperatureMap", {-90, 90}}], {-90, 90}},
Charting`Ticks -> ticks]
-
$\begingroup$ I am using Mathematica 10, but this is not working. It gives the right label but without color inside the barlegend $\endgroup$ – valar morghulis Mar 23 '17 at 23:24
-
$\begingroup$ I am using Mathematica 10, but this is not working. It gives the right label but without color inside the barlegend. @corey979 $\endgroup$ – valar morghulis Mar 25 '17 at 0:10
-
$\begingroup$ @Abdullah I'm using v10.4.1 and apparently it works. $\endgroup$ – corey979 Mar 25 '17 at 0:42
$\begingroup$
$\endgroup$
BarLegend[{"TemperatureMap", {-90 Degree, 90 Degree}},
"Ticks" -> Range[-80 Degree, 80 Degree, 20 Degree]]