cvxpy icon indicating copy to clipboard operation
cvxpy copied to clipboard

Add visual feature

Open nivmoti opened this issue 3 years ago • 10 comments

For programmers who use the CVXPY library, and for the developers of the library we want to add visuals to the optimization problems that found in the CVXPY library. Our idea is to add a feature as known as visual() function , the function will show the problem by tree diagrams like this example: עינבמעצבנת1

עינבהחרק2

nivmoti avatar Jan 03 '23 10:01 nivmoti

Hi @nivmoti ! Thanks for your interest in improving the visualization capabilities of CVXPY!

Have you started with an implementation already? @PTNobel and I recently talked about building a web tool similar to https://dcp.stanford.edu/analyzer that would integrate directly with CVXPY.

phschiele avatar Jan 03 '23 12:01 phschiele

Hi, @phschiele ! Yes, we started with implementation, we built a class called visual whose purpose is to show the cvxpy expression like a DCP.

einav242 avatar Feb 28 '23 10:02 einav242

Is there a codebase I could look at? This sounds awesome!

PTNobel avatar Feb 28 '23 22:02 PTNobel

hi! @PTNobel Attaching link to our repository https://github.com/nivmoti/cvxpyanalyzer, you can see there readme with running examples. the code is inside the Visual folder and the primary code is in a file named visual.py and the class of the tree is in the binary_tree.py file. We would also like to know if you have a recommendation for a library in Python with which we can paint the tree more clearly.

einav242 avatar Mar 14 '23 15:03 einav242

@einav242 we appreciate your contribution a lot! We will get back to you with recommendations for visualization libraries.

SteveDiamond avatar Mar 15 '23 23:03 SteveDiamond

@einav242 we discussed internally. Here were the ideas we had:

  • Output html
  • Use plotly or dash
  • GraphViz https://www.graphviz.org/
  • More tree visualization libraries https://stackoverflow.com/questions/7670280/tree-plotting-in-python

Sorry we can't be more helpful! Most of our visualization experience is using plotting libraries or in javascript/html.

SteveDiamond avatar Mar 16 '23 17:03 SteveDiamond

@SteveDiamond Ok we will try the options, thank you very much!

einav242 avatar Mar 17 '23 06:03 einav242

Hi! @SteveDiamond We wanted to update you about our progress in the project and ask your opinion. you can see in the link (https://github.com/nivmoti/cvxpyanalyzer/blob/master/README.md) the readme of our project with new example.

BarGoldman avatar Apr 04 '23 17:04 BarGoldman

Hi! @SteveDiamond We wanted to update you about our progress in the project and ask your opinion. you can see in the link (https://github.com/nivmoti/cvxpyanalyzer/blob/master/README.md) the readme of our project with new example.

It looks great! Do you want to make a pull request to cvxpyanalyzer?

SteveDiamond avatar Apr 04 '23 20:04 SteveDiamond

Yes , we did it. Thanks @SteveDiamond

BarGoldman avatar Apr 16 '23 14:04 BarGoldman

Resolved via https://github.com/cvxpy/cvxpyanalyzer/pull/2

phschiele avatar Apr 27 '24 20:04 phschiele