Richard Phillips
Wolfram Science Group
Boston, USA
Registered: Oct 2003
Posts: 46 |
I will answer your question here, but in general pure Mathematica questions are best directed at the MathGroup or Student support forums (the later if you have the student edition) See http://forums.wolfram.com/. Direct Technical Support is available to Mathematica Premier Service subscribers.
The following version of RasterGraphics includes a mesh:
RasterGraphics[state_?MatrixQ, colors_Integer : 2, opts___] := Graphics[{Raster[Reverse[1 - state/(colors - 1)]], Table[Line[{{0, i}, {Length[First[state]], i}}], {i, 0, Length[state]}], Table[Line[{{i, 0}, {i, Length[state]}}], {i, 0, Length[First[state]]}]}, AspectRatio -> ((AspectRatio /. {opts}) /. AspectRatio -> Automatic), opts]
You can also use:
ListDensityPlot[1-Reverse[state], Mesh->True, ColorFunctionScaling->False, Frame -> False, AspectRatio -> Automatic]
To specify an explicit range of visible y-coordinates in ListPlot you can use:
ListPlot[data, PlotRange -> {ymin, ymax}]
Report this post to a moderator | IP: Logged
|