Re: how to add color legend bar to a ListContourPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg124735] Re: how to add color legend bar to a ListContourPlot
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Fri, 3 Feb 2012 02:09:51 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201202010846.DAA15093@smc.vnet.net>
Needs["PlotLegends`"]
xyDat = Table[Sin[i + j^2],
{i, 0, 3, 0.1}, {j, 0, 3, 0.1}];
ShowLegend[ListContourPlot[xyDat],
{ColorData["LakeColors"][1 - #1] &, 10, "1", "-1",
LegendPosition -> {1.1, -.4}}]
Bob Hanlon
On Thu, Feb 2, 2012 at 4:58 AM, Ted Sariyski <tsariysk at craft-tech.com> wrote:
> Hi,
> I want to add a color legend to a ListContourPlot. I tried ShowLegend e.g.
>
> ShowLegend[ ListContourPlot[xyDat, {ColorData["LakeColors"][#1] &, 10, "
> 1", "-1"]
>
> but I don't know how to make the ColorFunction of ListContourPlot
> consistent with ColorData of ShowLegend. Or may be there is a different
> way of doing this?
>
> Any help will be greatly appreciated.
> Thanks,
> --Ted
>
- Follow-Ups:
- Re: how to add color legend bar to a ListContourPlot
- From: Ted Sariyski <tsariysk@craft-tech.com>
- Re: how to add color legend bar to a ListContourPlot
- References:
- Announcement: New Mathematica questions and answers site launched!
- From: Szabolcs HorvÃt <szhorvat@gmail.com>
- Announcement: New Mathematica questions and answers site launched!