MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Map legend

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120896] Re: Map legend
  • From: Heike Gramberg <heike.gramberg at gmail.com>
  • Date: Sun, 14 Aug 2011 20:18:28 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201108141214.IAA03395@smc.vnet.net>

Setting the labels in ShowLegend to ToString[min] and ToString[max] 
instead of " min" and " max" should work.

Heike.

On 14 Aug 2011, at 14:14, clansa wrote:

> Hello,
> I make this program to illustrate catastrophs (don1) by a map :
> Print["type de catastrophe : ", n4]
> quant = Quantile[don1, {5/100, 2/5, 3/5, 95/100}]
> abs[x_] :=
> Which[x == 0., GrayLevel[1.], x > 0. && x < quant[[1]],
>  GrayLevel[0.80], x > quant[[1]] && x < quant[[2]], GrayLevel[0.65],
>  x > quant[[2]] && x < quant[[3]], GrayLevel[0.50],
>  x > quant[[3]] && x < quant[[4]], GrayLevel[0.35], x > quant[[4]],
>  GrayLevel[0.]]
> val = Transpose@{CountryData[], don1};
> fig = Graphics[{abs[#[[2]]], EdgeForm[{Thin, Gray}],
>      CountryData[#[[1]], {"SchematicPolygon", "Robinson"}]} & /@ val,
>    ImageSize -> {600, 600}];
> max = Max[don1]
> min = Min[don1]
> Needs["PlotLegends`"]
> ShowLegend[fig, {GrayLevel[1 - #] &, 6, " min", " max",
>  LegendPosition -> {1.1, -.4}}]
>
> What is the solution to obtain automatic value for "max" and "min" on
> the ShowLegend instruction
>
> Thanks
>
> A. Dauphin=E9
> Geographer
>





  • References:
    • Map legend
      • From: clansa <dauphinester@gmail.com>
  • Prev by Date: Re: Getting the Date and Time From a Time Server
  • Next by Date: Re: Treat subscripted variables as symbols
  • Previous by thread: Map legend
  • Next by thread: Re: Map legend