Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4327
| From | Jacopo Bertolotti <jacopo.bertolotti@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: ListDensityPlot and Legend |
| Date | 2011-08-11 11:55 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j20fve$8oo$1@smc.vnet.net> (permalink) |
| References | <201108110909.FAA07147@smc.vnet.net> |
If I understand correctly what you want to do you have to evaluate the
maximum and the minimum of your data and pass it to ShowLegend as
strings via the function ToString.
Try working on this example:
Needs["PlotLegends`"]
data = Table[Sin[j^2 + i], {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}];
min = N@Min[data];
max = N@Max[data];
ShowLegend[ ListDensityPlot[data, InterpolationOrder -> 3],
{ColorData["LakeColors"][1 - #1] &, 10, ToString[max], ToString[min],
LegendPosition -> {1.1, -.4}, LegendShadow -> None}]
bye
Jacopo
On 08/11/2011 11:09 AM, math_new wrote:
> Hi,
>
> how can I create a color bar as a Legend such that the numbers at the
> legend really correspond to the highest/lowest value in the Plot. I
> don't understand the examples in the Documentation Center for Legend
> and ShowLegend.
>
> Cheers
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: ListDensityPlot and Legend Jacopo Bertolotti <jacopo.bertolotti@gmail.com> - 2011-08-11 11:55 +0000
csiph-web