Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4327 > unrolled thread
| Started by | Jacopo Bertolotti <jacopo.bertolotti@gmail.com> |
|---|---|
| First post | 2011-08-11 11:55 +0000 |
| Last post | 2011-08-11 11:55 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: ListDensityPlot and Legend Jacopo Bertolotti <jacopo.bertolotti@gmail.com> - 2011-08-11 11:55 +0000
| From | Jacopo Bertolotti <jacopo.bertolotti@gmail.com> |
|---|---|
| Date | 2011-08-11 11:55 +0000 |
| Subject | Re: ListDensityPlot and Legend |
| Message-ID | <j20fve$8oo$1@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 top | Article view | comp.soft-sys.math.mathematica
csiph-web