Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4416

Re: Map legend

From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Map legend
Date 2011-08-15 00:25 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j29p0v$7da$1@smc.vnet.net> (permalink)
References <201108141214.IAA03395@smc.vnet.net>

Show all headers | View raw


"n4" and "don1" are undefined, Transpose and CountryData throw errors, and  
the plot comes out blank.

Bobby

On Sun, 14 Aug 2011 07:14:13 -0500, clansa <dauphinester@gmail.com> 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
>


-- 
DrMajorBob@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Map legend DrMajorBob <btreat1@austin.rr.com> - 2011-08-15 00:25 +0000

csiph-web