ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 11 Jan 2019 11:17:22 +0100Plot of linear programming restrictions 2d, 3dhttps://ask.sagemath.org/question/45007/plot-of-linear-programming-restrictions-2d-3d/Is there a way automatical plot the restiriction and the solution.
I know how to plot them by hand. Is there an automatical graphical solution included?Fri, 11 Jan 2019 11:12:07 +0100https://ask.sagemath.org/question/45007/plot-of-linear-programming-restrictions-2d-3d/Answer by tmonteil for <p>Is there a way automatical plot the restiriction and the solution.
I know how to plot them by hand. Is there an automatical graphical solution included?</p>
https://ask.sagemath.org/question/45007/plot-of-linear-programming-restrictions-2d-3d/?answer=45008#post-id-45008You should give more deatils (e.g. your linear proogram, what do you want to restrict, etc). Without more informations, given a linear program `p` of dimension 2 or 3, you can get its polyhedron as follows:
sage: p.polyhedron()
that you can plot as follows:
sage: p.polyhedron().plot()
Fri, 11 Jan 2019 11:17:22 +0100https://ask.sagemath.org/question/45007/plot-of-linear-programming-restrictions-2d-3d/?answer=45008#post-id-45008