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

Interactive plotter #81

Merged
merged 60 commits into from
Aug 1, 2023
Merged

Interactive plotter #81

merged 60 commits into from
Aug 1, 2023

Conversation

kaueltzen
Copy link
Contributor

No description provided.

@JaGeo
Copy link
Owner

JaGeo commented Nov 28, 2022

Thank you so much for this! I will check it out now in detail :)

@JaGeo
Copy link
Owner

JaGeo commented Nov 28, 2022

This is a very good start :)!

  • My first suggestion would be to also extend to description class to also include automatic interative plots:

Similar to
describe.plot_cohps(ylim=[-10, 2], xlim=[-4, 4])

we could add:
describe.plot_interactive_cohps(ylim=[-10, 2], xlim=[-4, 4])

  • You could maybe start from similar code to (however, this seems to be very slow at the moment):

ia = InteractiveCohpPlotter() ia.add_all_relevant_cohps(complete_cohp, analyse) fig = ia.get_plot(ylim=[-10, 20]) fig.update_layout(title_text=calculation) fig.show()

  • You might also need to check out the labels from the automatic plots as well. I think the plots should fit also to the written description.

  • Do you have any idea why the code is currently very slow when executed? I think this would be another point to look into. Maybe, you could solve it by using a similar algorithm to the one in the current automatic plots?

  • When everything is finished, we also need to update documentation etc.

@kaueltzen
Copy link
Contributor Author

Thank you for your suggestions!
I used the same algorithm as in plot_cohps(), they are now of similar speed. It was that slow before because I didn't take the cohps from the analyse object but from an additionally created, unnecessarily large CompleteCohp object.
Will soon add an option for non-summed COHP plots.

@JaGeo
Copy link
Owner

JaGeo commented Dec 4, 2022

Great! Thank you! 😅 (Have a nice evening 😉!)

@JaGeo
Copy link
Owner

JaGeo commented Dec 13, 2022

@ahtakkatha could you again provide a short sample script for testing, please 😅. It would speed up the review from my side.

…gration options f. Analyze class (might move that to another branch)
@JaGeo
Copy link
Owner

JaGeo commented Dec 16, 2022

Yes, it would be great, if you would put the integration options to another branch! Thank you!

@JaGeo JaGeo added the enhancement New feature or request label Dec 22, 2022
@naik-aakash
Copy link
Collaborator

naik-aakash commented May 15, 2023

Todo

  • Add/Update tests
  • clean up the code
  • Fix linting issues

@JaGeo
Copy link
Owner

JaGeo commented Jun 20, 2023

@naik-aakash , I think I have addressed most of the general comments. It would be great if you could work on the ones related to the plotting options.

@JaGeo
Copy link
Owner

JaGeo commented Jun 20, 2023

There are still many inconsistencies when it comes to snakecase, unfortunately. This is on me as I simply haven't considered such a convention in the naming of arguments in some of my coding projects ... Changing this now would, however, lead to a lot of broken code (but it is maybe worth fixing it when we update the atomate2 schema the next time).

@naik-aakash
Copy link
Collaborator

@JaGeo Thank you for fixing so many suggestions already. 😃

@JaGeo @ajjackson, I will work on the rest review suggestions in the code in next week

lobsterpy/plotting/__init__.py Outdated Show resolved Hide resolved
lobsterpy/plotting/__init__.py Outdated Show resolved Hide resolved
lobsterpy/plotting/__init__.py Outdated Show resolved Hide resolved
lobsterpy/plotting/__init__.py Outdated Show resolved Hide resolved
lobsterpy/plotting/__init__.py Outdated Show resolved Hide resolved
@naik-aakash
Copy link
Collaborator

Hi @JaGeo and @ajjackson , I think I have manage to address the reviewed parts of code. Would be happy to address incase I missed out something or any more suggestions come up. 😃

@JaGeo
Copy link
Owner

JaGeo commented Jul 24, 2023

As discussed in person, @naik-aakash will add an example script on how to use the interactive plotter and add some documentatoin to the tutorial part of the repo. If this is there, I am happy to merge.

@naik-aakash
Copy link
Collaborator

Hi @ajjackson , I have one last question. Do you have any suggestions for how we have the functionality to change colors of the plotly figures via cli? Typing out a long list of hex codes is a bit inconvenient for users.

@JaGeo JaGeo merged commit 0a1efa2 into JaGeo:main Aug 1, 2023
47 checks passed
@ajjackson
Copy link
Collaborator

A convenient way to do this would be to allow colours to be read from matplotlib styles. It's a bit roundabout, but allows consistency with the other run modes.

The other option would be to create some new config format, or borrow one from another project. Any favourites?

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

Successfully merging this pull request may close these issues.

4 participants