Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.2K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Resolution plotting MultinormalDistribution

Posted 10 years ago

Hello, I'm trying to plot a 2D Gaussian to scale initial mass for a ground water tracer test, although the application isn't important to my question.

Consider the simple example found in Wolfram help:

ContourPlot[PDF[MultinormalDistribution[{0, 0}, {{2, 1/2}, {1/2, 1}}], {x,y}], {x, -3, 3}, {y, -3, 3}]

which produces a nice contour plot of a 2D Gaussian PDF.

When I rescale the plotting range (i.e., {x, -10, 10}, {y, -10, 10}), the center of the mass becomes either undefined (or truncated to some max value, not sure). I cannot figure out why this is happening, and do not know if this has something to do with the resolution of how Mathematica is interpreting between the range of x, y values or if it's something else. I'll need to completely rescale the plot for my application and I cannot go any further at the moment.

Any help would be much appreciated. I'm sure it's a pretty easy fix and I'm trying to make a deadline.

Thanks in advance, Matt

POSTED BY: Matt Reeves
2 Replies

Thank you Jim! This solved my problem.

POSTED BY: Matt Reeves
Posted 10 years ago

Use the option PlotRange->All to get rid of the undefined area and PlotPoints->50 to make things smoother. (Or even PlotPoints->200 if the surface is very complicated.) For more complicated surfaces you might also look at the MaxRecursion option.

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard