Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Show dot graph in interactive window #20

Open
p-glaum opened this issue Aug 16, 2024 · 7 comments
Open

Feature Request: Show dot graph in interactive window #20

p-glaum opened this issue Aug 16, 2024 · 7 comments

Comments

@p-glaum
Copy link

p-glaum commented Aug 16, 2024

Hi @ricnogfer,

thanks a lot for this cool package, it helps a lot for debugging purposes of big PyPSA networks!

I was wondering if it is possible to plot a or even an interactive dot plot inside an interactive window or Jupyter notebook. Because currently, I always export an SVG and open this separately.

@ricnogfer
Copy link
Owner

Hi @p-glaum,

Thanks for the appreciation!

I never tried what you are asking myself but will give it a spin once I have an opportunity - will post the findings here.

@coroa
Copy link

coroa commented Dec 18, 2024

Maybe you just need to add a few glue methods to https://github.com/jrfonseca/xdot.py ?

@ricnogfer
Copy link
Owner

ricnogfer commented Dec 19, 2024

Thanks for the suggestion @coroa!

This feature request is high on our priority list and it will most likely be solved in the beginning of next year. Succinctly, we are aiming to enable PyPSATopo with the following capabilities (this will cover many use-cases):

  • Display the generated DOT file in a separated graphical console (using, e.g., xdot.py for that purpose) when PyPSATopo is launched from a terminal (users will have to enable a flag when launching the tool).
  • Display the generated DOT file in a separated graphical console (using, e.g., xdot.py for that purpose) when PyPSATopo function generate is called from another Python script (user will have to enable a flag when calling the function).
  • Display the generated SVG file in a cell when PyPSATopo function generate is called inside Jupyter. [DONE]

@ricnogfer
Copy link
Owner

ricnogfer commented Dec 20, 2024

A new version of PyPSATopo (1.0.4) has been released. This release is able to display the result of generating the topographical representation of a PyPSA-based network in Jupyter (@p-glaum, @coroa, feel free to test it and report back if it does not work properly). To illustrate:

pypsatopo_jupyter

Concerning PyPSATopo being able to display the result of generating the topographical representation of a PyPSA-based network in a separated graphical console using xdot.py, this requires more thought given that this Python library is rather heavy (i.e. relies on other libraries). In addition, this library seems to not work on macOS.

@p-glaum
Copy link
Author

p-glaum commented Dec 20, 2024

cool! Thanks a lot.

@coroa
Copy link

coroa commented Dec 25, 2024

In addition, this library seems to not work on macOS

I am using xdot on mac osx. Installed with brew, though.

@ricnogfer
Copy link
Owner

Thanks for the clarification @coroa - will look into this as soon as possible!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants