Skip to content

Instantly share code, notes, and snippets.

@scholich
Last active April 29, 2016 16:22
Show Gist options
  • Save scholich/7880e3b639c9819ade98b51bd8e8f3fc to your computer and use it in GitHub Desktop.
Save scholich/7880e3b639c9819ade98b51bd8e8f3fc to your computer and use it in GitHub Desktop.
Mathematica Code to test BoundaryStyle setting of RegionPlot
hexToRGB =
RGBColor @@ (IntegerDigits[#~StringDrop~1~FromDigits~16, 256, 3]/
255.) &
colors = Table[ColorData[1][x], {x, 0, 36, 1}];
colorsHex = {"#DA96D1", "#DC4AD4", "#97E43B", "#52C858", "#B36EE2",
"#B0429C", "#827CE0", "#CC3B4F", "#7BDA91", "#498727", "#E94292",
"#C3D676", "#59397F", "#3EC3A3", "#E24925", "#5999EB", "#E69F34",
"#506BB4", "#DC722A", "#48BAD3", "#C0D5B7", "#72244C", "#C1B535",
"#D77F84", "#557B49", "#642B23", "#C3BCCF", "#D5A974", "#3D3448",
"#A95531", "#536B90", "#53817B", "#9B5B87", "#323B24", "#93776C",
"#7C6727"};
colors = Table[hexToRGB[colorsHex[[i]]], {i, 1, Length[colorsHex]}]
b = {False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False , False, False,
aS <= 0 && bP >= 0, aS >= 0 && bP >= 0 }
RegionPlot[b, {aS, -0.5, 1.}, {bP, -1.5, 1.5}, PlotPoints -> 50,
FrameLabel -> {"S", "P"},
PlotStyle -> colors,
BaseStyle -> {FontSize -> 22},
BoundaryStyle -> Directive[Black, Thick], Mesh -> None]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment