Optimizing Resolution in RegionPlot for Complex Conditions in Mathematica 6

  • Context: Mathematica 
  • Thread starter Thread starter dukebdx12
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary

Discussion Overview

The discussion revolves around optimizing resolution in RegionPlot within Mathematica 6, particularly when dealing with complex conditions. Participants seek guidance on creating surface and contour plots, adjusting viewpoints, and understanding resolution in the context of Mathematica's plotting capabilities.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant expresses a lack of familiarity with Mathematica and seeks assistance on how to begin with plotting functions.
  • Another participant suggests using Plot3D to create surface plots and provides an example of changing the viewpoint.
  • A participant asks whether simply substituting different values for the plot limits would suffice for generating various plots.
  • Clarification is provided that suitable intervals, viewpoints, and resolutions must be considered for each function.
  • One participant expresses confusion regarding the term "resolution" and requests an explanation.
  • Another participant proposes that "resolution" may refer to the density of the plot or the sampling frequency, suggesting methods to adjust these parameters.
  • A participant mentions the use of WorkingPrecision and Mesh options to enhance plot quality.
  • One participant shares their ongoing struggle with resolution issues in RegionPlot and recommends using PerformanceGoal and MaxRecursion options to improve plot quality.

Areas of Agreement / Disagreement

Participants generally agree on the need to adjust parameters for better plot resolution, but there are varying interpretations of what "resolution" entails and how to achieve it effectively. The discussion remains unresolved regarding the best practices for optimizing plots in Mathematica.

Contextual Notes

Participants discuss various methods and parameters without reaching a consensus on the optimal approach. The effectiveness of suggested solutions may depend on specific conditions and functions being plotted.

dukebdx12
Messages
9
Reaction score
0
can someone help me out with a mathematica problem ( i use mathematica 6)? I have never used this program before and really don't know what to do or where to start. So if someone could give me a little light that would be great.

http://i29.tinypic.com/25rkn5f.jpg

-last graph is g(x,y)=
 
Last edited:
Physics news on Phys.org
These must have been produced by Plot3D in Math'ca.

For example,

Plot3D[Cos[x y], {x, -3 \[Pi], 3 \[Pi]}, {y, -3 \[Pi], 3 \[Pi]}]

then shift+enter.

First thing I'd do is to hold & rotate the graph to change the ViewPoint.

To change it explicitly, you can type for example:

Plot3D[Cos[x y], {x, -3 \[Pi], 3 \[Pi]}, {y, -3 \[Pi], 3 \[Pi]}, ViewPoint -> {-1, 0, -3}]

Another thing to try is to change the plot limits from {x, -3 \[Pi], 3 \[Pi]} to (say) {x, -\[Pi], \[Pi]} (same for y).
 
ok thanks for the reply. my question is, it says make surface and contour plots for suitable intervals, viewpoints, and resolutions. For example f(x,y) = cos(xy) for -3pi <= x,y <= 3pi , that is 1 of the equations for the question. So to make surface and contour plots(many of them) do I just plug other numbers in for -3pi and 3pi? Confused on what I need to do.
 
You should make a surface plot and a contour plot for:

a. suitable intervals,

b. suitable viewpoints, and

c. suitable resolutions

for each function f, g, etc.

"Plugging other numbers in for -3pi and 3pi" addresses item a.
 
i've got it all down now except the resolutions. I have tried searching for it on google and mathematica and i can't find anything on how to do it. It says. to draw surface and contour plots for resolutions. I don't know what that means? can someone explain?
 
try searching in the master index in mathematica it is very good (help -> master index)
 
My guess is, "resolution" means "density" of the plot. For example in a ContourPlot, the number of contours you specify manually, as an option.

Alternatively, resolution can mean sampling frequency. Mathematica has a default sampling frequency when plotting graphs. You can change it by specifying a step size as part of the domain specification. For example:

{x, -\[Pi], \[Pi]} produces default sampling

{x, -\[Pi], \[Pi], \[Pi]/180} produces sampling along the x-axis with step size = 1 degree.
 
Last edited:
I noticed that a version of convert-pdf was used. If that free trial runs out, try searching for "cute pdf"...

sorry i didn't have anything of much value to add other than that...
 
Re my last post above:

If {x, -\[Pi], \[Pi], \[Pi]/180} doesn't work try putting in the option WorkingPrecision -> value in the Plot statement where the default value is MachinePrecision but you can specify a numeric value to increase plot precision (e.g. WorkingPrecision -> 20).

You can also experiment with Mesh and MeshFunctions options. For example:
Plot[Tan[x], {x, 0, Pi/2}, Mesh -> {5, 10}, MeshFunctions -> {#1 &, #2 &}]
 
Last edited:
  • #10
I have struggled with bad resolution and quality in RegionPlot for a long time. In particular this is a problem for complicated multiple conditions. The way to solve it is to add PerformanceGoal and MaxRecursion:

RegionPlot[ f(x,y)>0 && g(x,y)>0, {x,xmin,xmax},{y,ymin,ymax},
PerformanceGoal -> "Quality", MaxRecursion -> 8]

I suspect that the default values are PerformanceGoal -> "Speed", MaxRecursion -> 1. The speed and quality seems to be very sensitive to MaxRecursion, so experiment a bit with different values.

( google keywords: resolution RegionPlot Mathematica )
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 6 ·
Replies
6
Views
8K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K