wolframscience.com

A New Kind of Science: The NKS Forum : Powered by vBulletin version 2.3.0 A New Kind of Science: The NKS Forum > Pure NKS > Mathematica Help Required
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
Joe Hoppe


Registered: Feb 2004
Posts: 4

Mathematica Help Required

I just have two simple questions about Mathematica. I don't know if this is the most appropriate forum - if it isn't, it would appreciated if someone could point me in the right direction.

I am trying to create a graphic of a simple one dimensional automaton. The problem is I want the cellular grid to be shown in addition the automaton. The attached contains some basic code; it's basically the RasterGraphics function from the 'Further Examples' and a simple call of the CellularAutomaton[] function.

Also, in a less related question, how may I set the ymax and ymin when using ListPlot? The attached demonstrates my usage of it.

All suggestions welcome; they will really expedite my paper.

Joe Hoppe

Attachment: lacking_grid.nb
This has been downloaded 1285 time(s).

Report this post to a moderator | IP: Logged

Old Post 03-26-2004 03:32 AM
Joe Hoppe is offline Click Here to See the Profile for Joe Hoppe Click here to Send Joe Hoppe a Private Message Click Here to Email Joe Hoppe Edit/Delete Message Reply w/Quote
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

Old Post 03-26-2004 05:28 AM
Richard Phillips is offline Click Here to See the Profile for Richard Phillips Click here to Send Richard Phillips a Private Message Edit/Delete Message Reply w/Quote
Joe Hoppe


Registered: Feb 2004
Posts: 4

Thanks

Thank you for the direction and assitance. It is much appreciated.

Report this post to a moderator | IP: Logged

Old Post 03-26-2004 02:44 PM
Joe Hoppe is offline Click Here to See the Profile for Joe Hoppe Click here to Send Joe Hoppe a Private Message Click Here to Email Joe Hoppe Edit/Delete Message Reply w/Quote
Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread


 

wolframscience.com  |  wolfram atlas  |  NKS online  |  web resources  |  contact us

Forum Sponsored by Wolfram Research

© 2004-13 Wolfram Research, Inc. | Powered by vBulletin 2.3.0 © 2000-2002 Jelsoft Enterprises, Ltd. | Disclaimer | Archives