MathGroup Archive 2010

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

Search the Archive

How can I generate this graphic?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113584] How can I generate this graphic?
  • From: Vicent <vginer at gmail.com>
  • Date: Wed, 3 Nov 2010 02:56:38 -0500 (EST)

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: How to change LineIndent for a cell or the notebook
  • Next by Date: Re: NDSolve and hybrid dynamics (Differential Algebraic Equation
  • Previous by thread: Re: How to change LineIndent for a cell or the notebook
  • Next by thread: Re: How can I generate this graphic?