How do you define the domain of a plot? For instance, if I want to plot a standardized bivariate normal density function (with $r=0$), how do I specify the domain to be $[-3,3]$?
migrated from stats.stackexchange.com Feb 24 '12 at 8:08
|
For simple regions like your interval or a square region, you can just give the appropriate border, as shown by the earlier answers. For completeness, I repeat them here: Domain $[-3,3]$:
Domain $[-3,3]\times [-3,3]$:
For more complex domains, you have several options: First, you can explicitly use a function with limited domain, e.g. for the domain $[-2,-1)\cup(1,2]$:
Or for 2D:
Another possibility is to give the region in the plot command:
Finally, for 3D plot you might also use some parametrization of your domain resulting in a square parameter range and use
Of course you can also combine those methods, e.g.
|
|||
|
|
|
You can either plot the function only for a narrow range, or play around with the There is an important difference between specifying the plot range a la Here's an example that uses both options: It first calculates your multivariate distribution on $(x,y)\in([-5,5],[-5,5])$, and then displays only the proportion that lies in $([-5,3],[-2,3])$:
(The |
|||||||||||
|


Plotsection of mathematica's electronic manual. For future questions, please try to read the documentation first and if that doesn't help indicate where you encounter problems. – Sjoerd C. de Vries Feb 24 '12 at 13:10