Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

how to generate mesh functions according to more than one condition?

This plot will have mesh according to z:

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, MeshFunctions -> {#3 &}]

This plot will have mesh according to x:

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, MeshFunctions -> {#3 &}]

how to generate MeshFunctions with more that one conditions? I want something like this:

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, 
 MeshFunctions -> {#1 || #3 &}]
share|improve this question

closed as off-topic by Rahul Narain, m_goldberg, Mr.Wizard Jul 20 at 10:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Rahul Narain, m_goldberg, Mr.Wizard
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

If I understand your question then you want:

Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, MeshFunctions -> {#1 &, #3 &}]

enter image description here

If that is the case this is directly documented and the question should probably be closed. If not please try again.

share|improve this answer
    
Yes this is the case. but again when I use this form Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, MeshFunctions -> Function[{x, y, z}, {x, z}]], it did not work. –  Algohi Jul 20 at 9:15
3  
@Algohi: You need to provide a list of functions, not a function that returns a list: MeshFunctions -> {Function[{x, y, z}, x], Function[{x, y, z}, z]} –  Rahul Narain Jul 20 at 9:23
    
@Mr.Wizard Ok I got it. thanks –  Algohi Jul 20 at 9:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.