Skip to main content
2 of 3
added 823 characters in body

Number format of plot legend

How can I change format of numbers for bar legends. I would like to show numbers without digits after the decimal point.

[![bar legend][1]][1] [1]: https://i.sstatic.net/Y9wwH.png

ListContourPlot[data,
 AspectRatio -> Automatic,
 PlotRange -> {Automatic, Automatic, {m, M}},
 PlotLegends -> 
  Placed[BarLegend[{Automatic, {lb, ub}}, LegendMarkerSize -> 200, 
    LegendLabel -> Placed["\[CapitalOmega].m", Bottom], 
    LabelStyle -> {Black, 14}, , LegendFunction -> f], Right],
 ColorFunctionScaling -> False,
 ContourShading -> Hue /@ Reverse[Subdivide[.67, nc - 1]],
 ImageSize -> 1200,
 ContourStyle -> None,
 Contours -> Table[lb*(ub/lb)^(n/nc), {n, 1, nc - 1}],
 PlotRangePadding -> None,
 FrameLabel -> {"Distance (m)", "Depth (m)", None, "Elevation (ft)"},
 LabelStyle -> {Black, 14},
 FrameTicks -> {{All, 
    Table[{-3.05 n, 262 - 10 n}, {n, 0, 9, 1}]}, {All, None}},
 AspectRatio -> .2
 ]