Is there a way to visualize the feasible region for a set of linear inequalities in plotly in 2d? in 3d?
Say I have the inequalities:
How can I visualize the feasible region in Plotly? What about if my region is in 3d? I know that we can do this in other libraries (e.g. matplotlib), but I specifically want to do this in plotly.
Unfortunately, I don't think so.
A few months ago I stumbled on the same problem as I was developing a new plotting module for SymPy. After testing different things, these are my conclusions:
ax.contour
(and setting the contour levels) or with ax.fill
.go.Contour
doesn't currently support setting contour levels (see issue 4503). This results in difficult to read plots. Here is a comparison of the first inequality that you posted with Matplotlib (blue region is where the inequality is true) and Plotly (yellow region is where the inequality is true).ax.fill
.go.Heatmap
, but it is not suitable for this application.