Plotting multiple feasible reagions using plots[inequal]

July 13 2009 by hanswurst 353
false
Maple

0


I'm trying to plot multiple feasible reagions of an linear program (which are defined by H] and H2, see below) into a single (!) plot using plots[inequal] as follows:

q := plots[inequal]({0 <= x*H2[1][1]+y*H2[1][2], 0 <= x*H2[2][1]+y*H2[2][2]}, x = -5 .. 5, y = -4 .. 4, optionsfeasible = (color = gray), optionsopen = (color = black, thickness = 3), optionsclosed = (color = black, thickness = 3), optionsexcluded = (color = white)):
p := plots[inequal]({0 <= x*H2[1][1]+y*H2[1][2], 0 <= x*H2[2][1]+y*H2[2][2]}, x = -5 .. 5, y = -4 .. 4, optionsfeasible = (color = gray), optionsopen = (color = black, thickness = 3), optionsclosed = (color = black, thickness = 3), optionsexcluded = (color = white)):
plots[display]([p, q], axes = normal)

However, this clearly draws only one region because the other one gets 'overdrawn' by white. Setting trasparency didn't work when I tried it.

 
Loading Comments & Answers

You must be logged into your MaplePrimes account in order to post a comment. If you don't have an account, you can create an account here.

     

Forgot Your Password? Create an Account