Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2928
| From | "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: ContourPlot ColorFunction Question |
| Date | 2011-06-04 10:20 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <isd0sh$1ne$1@smc.vnet.net> (permalink) |
This looks amazingly similar to an answer I gave on the Mathematica student forum a couple of days ago (http://forums.wolfram.com/student-support/topics/25780). Together with your sentence "We are trying to plot..." this smells like a homework assignment. Anyway I can tell you that you shouldn't use a signal '=' in your plot function, but a '==' (but probably, if you want to see multiple contour levels you should delete the right hand side) and the ColorFunction -> (If[2 #1 > 1, Red, Green] &) part worked for Plot (as I used it on the student forum) where #1 is the x coordinate (see documentation of ColorFunction), so 2 #1 would indeed be the derivative of a function like y = x^2. Alas, for ContourPlot, the ColorFunction gets passed the values of the contour levels. Multiplying this with 2 doesn't have anything to do with derivatives. For starters, you might want to read some docs about contourplots, and you really should try to understand more deeply what they depict. Otherwise this whole exercise isn't getting you anywhere.
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: ContourPlot ColorFunction Question "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> - 2011-06-04 10:20 +0000
csiph-web