Skip to main content
deleted 348 characters in body
Source Link
OkkesDulgerci
  • 10.9k
  • 1
  • 19
  • 40
 colorWig[z_] := 
     Which[-1 < z <= 0, ColorData["DeepSeaColors"][Rescale[z, {-1, 0}]], 
      0 <= z < 1, ColorData["AvocadoColors"][Rescale[z, {0, 1}]]]
    DensityPlot[Sin[x y], {x, -1, 1}, {y, -1, 1}, 
     ColorFunction -> colorWig, ColorFunctionScaling -> False, 
     PlotPoints -> 50, PlotLegends -> Automatic]

So we are safe to choose range [-0.76,0.7]64]

  colorWig[z_] := 
 Which[-0.76 < z <= 0, 
  ColorData["DeepSeaColors"][Rescale[zColorData[{"DeepSeaColors", "Reverse"}][Rescale[z, {-0.76, 0}]], 
  0 <= z < 0.765, 
  ColorData["AvocadoColors"][Rescale[z, {0, 0.765}]]]
DensityPlot[Wigner[x, y], {x, -6, 6}, {y, -2, 2}, PlotRange -> All, 
 ColorFunction -> colorWig, ColorFunctionScaling -> False, 
 PlotLegends -> 
  Placed[BarLegend[Automatic, LegendMargins -> {{26, 20}, {-15, 0}}, 
    LegendMarkerSize -> {475, 30}], Above], 
 ImagePadding -> {{45, 20}, {45, 10}}, PlotRangePadding -> None, 
 ImageSize -> {600, 200}, AspectRatio -> Automatic, 
 FrameLabel -> {"x", "y"}, FrameStyle -> Black, 
 FrameTicksStyle -> Directive[Black, 14], 
 LabelStyle -> {Black, Bold, 14}, PlotPoints -> 50]

enter image description here

Or reverse DeepSeaColors

colorWig[z_] := 
 Which[-0.7 < z <= 0, 
  ColorData[{"DeepSeaColors", "Reverse"}][Rescale[z, {-0.7, 0}]], 
  0 <= z < 0.7, ColorData["AvocadoColors"][Rescale[z, {0, 0.7}]]]

enter image description hereenter image description here

colorWig[z_] := 
 Which[-1 < z <= 0, ColorData["DeepSeaColors"][Rescale[z, {-1, 0}]], 
  0 <= z < 1, ColorData["AvocadoColors"][Rescale[z, {0, 1}]]]
DensityPlot[Sin[x y], {x, -1, 1}, {y, -1, 1}, 
 ColorFunction -> colorWig, ColorFunctionScaling -> False, 
 PlotPoints -> 50, PlotLegends -> Automatic]

So we are safe to choose range [-0.7,0.7]

colorWig[z_] := 
 Which[-0.7 < z <= 0, 
  ColorData["DeepSeaColors"][Rescale[z, {-0.7, 0}]], 0 <= z < 0.7, 
  ColorData["AvocadoColors"][Rescale[z, {0, 0.7}]]]
DensityPlot[Wigner[x, y], {x, -6, 6}, {y, -2, 2}, PlotRange -> All, 
 ColorFunction -> colorWig, ColorFunctionScaling -> False, 
 PlotLegends -> 
  Placed[BarLegend[Automatic, LegendMargins -> {{26, 20}, {-15, 0}}, 
    LegendMarkerSize -> {475, 30}], Above], 
 ImagePadding -> {{45, 20}, {45, 10}}, PlotRangePadding -> None, 
 ImageSize -> {600, 200}, AspectRatio -> Automatic, 
 FrameLabel -> {"x", "y"}, FrameStyle -> Black, 
 FrameTicksStyle -> Directive[Black, 14], 
 LabelStyle -> {Black, Bold, 14}, PlotPoints -> 50]

enter image description here

Or reverse DeepSeaColors

colorWig[z_] := 
 Which[-0.7 < z <= 0, 
  ColorData[{"DeepSeaColors", "Reverse"}][Rescale[z, {-0.7, 0}]], 
  0 <= z < 0.7, ColorData["AvocadoColors"][Rescale[z, {0, 0.7}]]]

enter image description here

 colorWig[z_] := 
     Which[-1 < z <= 0, ColorData["DeepSeaColors"][Rescale[z, {-1, 0}]], 
      0 <= z < 1, ColorData["AvocadoColors"][Rescale[z, {0, 1}]]]
    DensityPlot[Sin[x y], {x, -1, 1}, {y, -1, 1}, 
     ColorFunction -> colorWig, ColorFunctionScaling -> False, 
     PlotPoints -> 50, PlotLegends -> Automatic]

So we are safe to choose range [-0.6,0.64]

  colorWig[z_] := 
 Which[-0.6 < z <= 0, 
  ColorData[{"DeepSeaColors", "Reverse"}][Rescale[z, {-0.6, 0}]], 
  0 <= z < 0.65, ColorData["AvocadoColors"][Rescale[z, {0, 0.65}]]]
DensityPlot[Wigner[x, y], {x, -6, 6}, {y, -2, 2}, PlotRange -> All, 
 ColorFunction -> colorWig, ColorFunctionScaling -> False, 
 PlotLegends -> 
  Placed[BarLegend[Automatic, LegendMargins -> {{26, 20}, {-15, 0}}, 
    LegendMarkerSize -> {475, 30}], Above], 
 ImagePadding -> {{45, 20}, {45, 10}}, PlotRangePadding -> None, 
 ImageSize -> {600, 200}, AspectRatio -> Automatic, 
 FrameLabel -> {"x", "y"}, FrameStyle -> Black, 
 FrameTicksStyle -> Directive[Black, 14], 
 LabelStyle -> {Black, Bold, 14}, PlotPoints -> 50]

enter image description here

Source Link
OkkesDulgerci
  • 10.9k
  • 1
  • 19
  • 40

colorWig[z_] := 
 Which[-1 < z <= 0, ColorData["DeepSeaColors"][Rescale[z, {-1, 0}]], 
  0 <= z < 1, ColorData["AvocadoColors"][Rescale[z, {0, 1}]]]
DensityPlot[Sin[x y], {x, -1, 1}, {y, -1, 1}, 
 ColorFunction -> colorWig, ColorFunctionScaling -> False, 
 PlotPoints -> 50, PlotLegends -> Automatic]

enter image description here

Reverse AvocadoColors

colorWig[z_] := 
 Which[-1 < z <= 0, ColorData["DeepSeaColors"][Rescale[z, {-1, 0}]], 
  0 <= z < 1, 
  ColorData[{"AvocadoColors", "Reverse"}][Rescale[z, {0, 1}]]]

enter image description here

NMaximize[{Wigner[x, y], -6 <= x <= 6, -2 <= y <= 2}, {x, y}, 
 Method -> "DifferentialEvolution"]

{0.63662, {x -> 0., y -> 0.}}

NMinimize[{Wigner[x, y], -6 <= x <= 6, -2 <= y <= 2}, {x, y}, 
 Method -> "DifferentialEvolution"]

{-0.590076, {x -> 8.73424*10^-32, y -> 0.193331}}

So we are safe to choose range [-0.7,0.7]

colorWig[z_] := 
 Which[-0.7 < z <= 0, 
  ColorData["DeepSeaColors"][Rescale[z, {-0.7, 0}]], 0 <= z < 0.7, 
  ColorData["AvocadoColors"][Rescale[z, {0, 0.7}]]]
DensityPlot[Wigner[x, y], {x, -6, 6}, {y, -2, 2}, PlotRange -> All, 
 ColorFunction -> colorWig, ColorFunctionScaling -> False, 
 PlotLegends -> 
  Placed[BarLegend[Automatic, LegendMargins -> {{26, 20}, {-15, 0}}, 
    LegendMarkerSize -> {475, 30}], Above], 
 ImagePadding -> {{45, 20}, {45, 10}}, PlotRangePadding -> None, 
 ImageSize -> {600, 200}, AspectRatio -> Automatic, 
 FrameLabel -> {"x", "y"}, FrameStyle -> Black, 
 FrameTicksStyle -> Directive[Black, 14], 
 LabelStyle -> {Black, Bold, 14}, PlotPoints -> 50]

enter image description here

Or reverse DeepSeaColors

colorWig[z_] := 
 Which[-0.7 < z <= 0, 
  ColorData[{"DeepSeaColors", "Reverse"}][Rescale[z, {-0.7, 0}]], 
  0 <= z < 0.7, ColorData["AvocadoColors"][Rescale[z, {0, 0.7}]]]

enter image description here