MathGroup Archive 2009

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

Search the Archive

Re: Extracting contour values from ContourPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100825] Re: [mg100797] Extracting contour values from ContourPlot
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 15 Jun 2009 05:36:43 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

data = Table[Sin[i + j^2],
   {i, 0, 3, 0.1}, {j, 0, 3, 0.1}];

Select[Options[ListContourPlot],
 ! StringFreeQ[ToString[#], "Labels"] &]

{ContourLabels -> Automatic}

ListContourPlot[data,
 ContourLabels -> True]


Bob Hanlon

---- dg <davide.guarisco at gmail.com> wrote: 

=============
I have spent an hour researching this group and online, with no
definitive answer.

The problem: I have an nxm matrix of z values that I want to plot with
List(Contour|Density)Plot together with a legend that shows the
*actual* values of the contours used in the plot. (Seems like a pretty
basic thing to me....). I know how to draw a nice legend, that's not
the problem.

I have found a way to do it: I can specify the contours and plot range
explicitly. But what I really want is not to have to do this, and rely
on the semi-intelligent mechanism of Mathematica to pick an appropriate number
of contours and their values, THEN use those to draw the legend.

It seems that there is no way to do this. That is, there is no way to
extract the actual contour values used in the plot. I found a
ColorBarPlot package which however does not work in Mathematica 7:
  <http://library.wolfram.com/infocenter/MathSource/7030/>

Is it really not possible to do
this?



  • Prev by Date: Re: weird escaping problem with StringPattern inside Module[]
  • Next by Date: Re: Re: mergeSort with ReplaceRepeated
  • Previous by thread: Re: Extracting contour values from ContourPlot
  • Next by thread: Re: Extracting contour values from ContourPlot