Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: How can I generate this graphic?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113585] Re: How can I generate this graphic?
  • From: Vicent <vginer at gmail.com>
  • Date: Wed, 3 Nov 2010 02:56:50 -0500 (EST)
  • References: <AANLkTi=tL4NB8=ObF1623NAFxuaekj415C5d2yC=u-aa@mail.gmail.com>

Hello again.

I've found a solution to the question I reported previously, using
"ListContourPlot" function:

DataFor Plotting = Table[myfunc[x, y], {x, 1, 20, 1}, {y, 1, 20, 1}]

ListContourPlot[DataForPlotting, InterpolationOrder -> 0, ContourLabels ->
All, PerformanceGoal -> "Quality"]

I get this:
http://dl.dropbox.com/u/155485/discrete_contour_plot_with_mathematica.png

As you can see, I don't get any contour labels. Moreover, I would like to
know if the purple "square" that is located on the surface defined by the
set [1 , 2] x [2 , 3] corresponds to the pair (x=1 ,  y=2) or (x=2 , y=3),
for example.

So, given this solution, I still would need your advice regarding how to
"tune" this graphic.

Thank you very much in advance!!

--
Vicent




On Tue, Nov 2, 2010 at 14:30, Vicent <vginer at gmail.com> wrote:

> Hello to all.
>
> I want to make you a question about how to plot a specific graphic with
> Mathematica 7.0.
>
> I have a function  "myfunc"  defined on two discrete variables, say  x  and
>  y. And I want to represent graphically "myfunc".
>
> I can generate some graphics with   ListPlot3D  and   ListContourPlot
> that are close to what I want, but in both cases there is an interpolation,
> which is OK but it is not necessary, and I would like to be able to generate
> a graphic (2D or 3D) without any interpolation.
>
> More precisely, I would like to generate a 2D graphic, the X and Y axis
> representing the discrete variables  x  and  y,  respectively, with a
> "point" (or "big square") for each integer combination of (x, y), the color
> of the point being related with the value of  myfunc(x,y)  .  I mean, the
> greater the value of   myfunc(x,y)  is, the lighter (or whatever) the color
> of the associated point is. It would be like a kind of    "ListContourPlot",
>  but without interpolating.
>
> I have data arranged in this way:
>
> DataForPlotting  =  Table[myfunc[x, y], {x, 1, 20, 1}, {y, 1, 20, 1}]
>
>
> but of course I could do it in another way if necessary.
>
> This is an image of what I want to achieve:
> http://dl.dropbox.com/u/155485/discrete_contour_plot.png  . In case you
> can't access it, please let me know it.
>
> I think it can be possible to build a graphic similar to that one with
> Mathematica, but I am not sure of the easiest (or more logical or more
> practical) way to do it, as I am just a beginner.
>
> So, I would appreciate your help in this point.
>
> Thank you very much in advance for your help!
>
> --
> Vicent Giner-Bosch
>


  • Prev by Date: Re: NDSolve and hybrid dynamics (Differential Algebraic Equation
  • Next by Date: Re: NDSolve and hybrid dynamics (Differential Algebraic Equation DAE)
  • Previous by thread: How can I generate this graphic?
  • Next by thread: Re: How can I generate this graphic?