Skip to main content
improved ContourPlot
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247

The most direct way uses RegionPlot e.g.

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}]

let's customize it a bit using colors from many possible ColorData["Gradients"]:

GraphicsRow[ 
    RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
                ColorFunction -> Function[{x, y}, ColorData[#][Abs[g[x, y]]]], 
                ColorFunctionScaling -> False, PlotPoints -> 100, MaxRecursion -> 5]& /@
    {"BlueGreenYellow", "DarkBands"} ]

enter image description here

One can also get the plot with ContourPlot, e.g. using the RegionFunction option:

ContourPlot[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
             RegionFunction -> Function[{x, y}, g[x, y] > 0], 
             PlotPoints -> 80, MaxRecursionExclusions -> 4]None] 

enter image description hereenter image description here

At last, we can make Plot3D better fitting to our needs:

Plot3D[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, MeshFunctions -> {#3 &}, 
        PlotRange -> All, RegionFunction -> Function[{x, y}, g[x, y] > 0], 
        ColorFunction -> Function[{x, y}, ColorData["BlueGreenYellow"][g[x, y]]], 
        ColorFunctionScaling -> False, BoxRatios -> {2, 2, 1}, PlotPoints -> 80, 
        MaxRecursion -> 4, Exclusions -> None]

enter image description here

The most direct way uses RegionPlot e.g.

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}]

let's customize it a bit using colors from many possible ColorData["Gradients"]:

GraphicsRow[ 
    RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
                ColorFunction -> Function[{x, y}, ColorData[#][Abs[g[x, y]]]], 
                ColorFunctionScaling -> False, PlotPoints -> 100, MaxRecursion -> 5]& /@
    {"BlueGreenYellow", "DarkBands"} ]

enter image description here

One can also get the plot with ContourPlot, e.g. using the RegionFunction option:

ContourPlot[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
             RegionFunction -> Function[{x, y}, g[x, y] > 0], 
             PlotPoints -> 80, MaxRecursion -> 4] 

enter image description here

At last, we can make Plot3D better fitting to our needs:

Plot3D[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, MeshFunctions -> {#3 &}, 
        PlotRange -> All, RegionFunction -> Function[{x, y}, g[x, y] > 0], 
        ColorFunction -> Function[{x, y}, ColorData["BlueGreenYellow"][g[x, y]]], 
        ColorFunctionScaling -> False, BoxRatios -> {2, 2, 1}, PlotPoints -> 80, 
        MaxRecursion -> 4, Exclusions -> None]

enter image description here

The most direct way uses RegionPlot e.g.

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}]

let's customize it a bit using colors from many possible ColorData["Gradients"]:

GraphicsRow[ 
    RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
                ColorFunction -> Function[{x, y}, ColorData[#][Abs[g[x, y]]]], 
                ColorFunctionScaling -> False, PlotPoints -> 100, MaxRecursion -> 5]& /@
    {"BlueGreenYellow", "DarkBands"} ]

enter image description here

One can also get the plot with ContourPlot, e.g. using the RegionFunction option:

ContourPlot[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
             RegionFunction -> Function[{x, y}, g[x, y] > 0], Exclusions -> None] 

enter image description here

At last, we can make Plot3D better fitting to our needs:

Plot3D[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, MeshFunctions -> {#3 &}, 
        PlotRange -> All, RegionFunction -> Function[{x, y}, g[x, y] > 0], 
        ColorFunction -> Function[{x, y}, ColorData["BlueGreenYellow"][g[x, y]]], 
        ColorFunctionScaling -> False, BoxRatios -> {2, 2, 1}, PlotPoints -> 80, 
        MaxRecursion -> 4, Exclusions -> None]

enter image description here

added 63 characters in body
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247

The most direct way uses RegionPlot e.g.

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}]

let's customize it a bit using colors from many possible ColorData["Gradients"]:

GraphicsRow[ 
    RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
                ColorFunction -> Function[{x, y}, ColorData[#][Abs[g[x, y]]]], 
                ColorFunctionScaling -> False, PlotPoints -> 100, MaxRecursion -> 5]& /@
    {"BlueGreenYellow", "DarkBands"} ]

enter image description here

One can also get the plot with ContourPlot, e.g. using the RegionFunction option:

ContourPlot[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
             RegionFunction -> Function[{x, y}, g[x, y] > 0], 
             PlotPoints -> 80, MaxRecursion -> 4] 

enter image description here

At last, we can make Plot3D better fitting to our needs:

Plot3D[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, MeshFunctions -> {#3 &}, 
        PlotRange -> All, RegionFunction -> Function[{x, y}, g[x, y] > 0], 
        ColorFunction -> Function[{x, y}, ColorData["BlueGreenYellow"][g[x, y]]], 
        ColorFunctionScaling -> False, BoxRatios -> {2, 2, 1}, PlotPoints -> 80, 
        PlotPointsMaxRecursion -> 804, MaxRecursionExclusions -> 4]None]

enter image description hereenter image description here

The most direct way uses RegionPlot e.g.

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}]

let's customize it a bit using colors from many possible ColorData["Gradients"]:

GraphicsRow[ 
    RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
                ColorFunction -> Function[{x, y}, ColorData[#][Abs[g[x, y]]]], 
                ColorFunctionScaling -> False, PlotPoints -> 100, MaxRecursion -> 5]& /@
    {"BlueGreenYellow", "DarkBands"} ]

enter image description here

One can also get the plot with ContourPlot, e.g. using the RegionFunction option:

ContourPlot[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
             RegionFunction -> Function[{x, y}, g[x, y] > 0], 
             PlotPoints -> 80, MaxRecursion -> 4] 

enter image description here

At last, we can make Plot3D better fitting to our needs:

Plot3D[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, MeshFunctions -> {#3 &}, 
        PlotRange -> All, RegionFunction -> Function[{x, y}, g[x, y] > 0], 
        ColorFunction -> Function[{x, y}, ColorData["BlueGreenYellow"][g[x, y]]], 
        ColorFunctionScaling -> False, BoxRatios -> {2, 2, 1}, 
        PlotPoints -> 80, MaxRecursion -> 4]

enter image description here

The most direct way uses RegionPlot e.g.

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}]

let's customize it a bit using colors from many possible ColorData["Gradients"]:

GraphicsRow[ 
    RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
                ColorFunction -> Function[{x, y}, ColorData[#][Abs[g[x, y]]]], 
                ColorFunctionScaling -> False, PlotPoints -> 100, MaxRecursion -> 5]& /@
    {"BlueGreenYellow", "DarkBands"} ]

enter image description here

One can also get the plot with ContourPlot, e.g. using the RegionFunction option:

ContourPlot[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
             RegionFunction -> Function[{x, y}, g[x, y] > 0], 
             PlotPoints -> 80, MaxRecursion -> 4] 

enter image description here

At last, we can make Plot3D better fitting to our needs:

Plot3D[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, MeshFunctions -> {#3 &}, 
        PlotRange -> All, RegionFunction -> Function[{x, y}, g[x, y] > 0], 
        ColorFunction -> Function[{x, y}, ColorData["BlueGreenYellow"][g[x, y]]], 
        ColorFunctionScaling -> False, BoxRatios -> {2, 2, 1}, PlotPoints -> 80, 
        MaxRecursion -> 4, Exclusions -> None]

enter image description here

added 745 characters in body
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247

One can do it withThe most direct way uses RegionPlot e.g.

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}]

let's customize it a bit using colors from many possible ColorData["Gradients"]:

GraphicsRow[ 
    RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
                ColorFunction -> Function[{x, y}, ColorData["AvocadoColors"][Abs[g[xColorData[#][Abs[g[x, y]]]], 
                ColorFunctionScaling -> False]False, PlotPoints -> 100, MaxRecursion -> 5]& /@
    {"BlueGreenYellow", "DarkBands"} ]

enter image description hereenter image description here

but oneOne can also get the plot with ContourPlot with, e.g. using the RegionFunction option:

ContourPlot[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
             RegionFunction -> Function[{x, y}, g[x, y] > 0]]0], 
             PlotPoints -> 80, MaxRecursion -> 4] 

enter image description hereenter image description here

At last, we can make Plot3D better fitting to our needs:

Plot3D[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, MeshFunctions -> {#3 &}, 
        PlotRange -> All, RegionFunction -> Function[{x, y}, g[x, y] > 0], 
        ColorFunction -> Function[{x, y}, ColorData["BlueGreenYellow"][g[x, y]]], 
        ColorFunctionScaling -> False, BoxRatios -> {2, 2, 1}, 
        PlotPoints -> 80, MaxRecursion -> 4]

enter image description here

One can do it with RegionPlot e.g.

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}]

let's customize it a bit:

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
            ColorFunction -> Function[{x, y}, ColorData["AvocadoColors"][Abs[g[x, y]]]], 
            ColorFunctionScaling -> False]

enter image description here

but one can also get the plot with ContourPlot with e.g. RegionFunction:

ContourPlot[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
             RegionFunction -> Function[{x, y}, g[x, y] > 0]]

enter image description here

The most direct way uses RegionPlot e.g.

RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}]

let's customize it a bit using colors from many possible ColorData["Gradients"]:

GraphicsRow[ 
    RegionPlot[ g[x, y] > 0, {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
                ColorFunction -> Function[{x, y}, ColorData[#][Abs[g[x, y]]]], 
                ColorFunctionScaling -> False, PlotPoints -> 100, MaxRecursion -> 5]& /@
    {"BlueGreenYellow", "DarkBands"} ]

enter image description here

One can also get the plot with ContourPlot, e.g. using the RegionFunction option:

ContourPlot[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, 
             RegionFunction -> Function[{x, y}, g[x, y] > 0], 
             PlotPoints -> 80, MaxRecursion -> 4] 

enter image description here

At last, we can make Plot3D better fitting to our needs:

Plot3D[ g[x, y], {x, -0.5, 2.5}, {y, -0.5, 2.5}, MeshFunctions -> {#3 &}, 
        PlotRange -> All, RegionFunction -> Function[{x, y}, g[x, y] > 0], 
        ColorFunction -> Function[{x, y}, ColorData["BlueGreenYellow"][g[x, y]]], 
        ColorFunctionScaling -> False, BoxRatios -> {2, 2, 1}, 
        PlotPoints -> 80, MaxRecursion -> 4]

enter image description here

added 316 characters in body
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247
Loading
Source Link
Artes
  • 57.9k
  • 13
  • 159
  • 247
Loading