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

Convergence plots Demo [Do Not Merge] #1629

Closed
wants to merge 2,612 commits into from

Conversation

atharva-2001
Copy link
Member

@atharva-2001 atharva-2001 commented Jun 7, 2021

This PR aims to share a demo of convergence plots to be made for TARDIS.
Please see: #1636

Description

Motivation and context

How has this been tested?

  • Testing pipeline.
  • Other.

Examples
Link to view the combined plots as plotly subplots
Link to convergence plots with Vbox.
Link to the above convergence plot notebook in the documentation

Type of change

  • Bug fix.
  • New feature.
  • Breaking change.
  • None of the above.

Checklist

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
    • (optional) I have built the documentation on my fork following the instructions.
  • I have assigned and requested two reviewers for this pull request.

andrewfullard and others added 30 commits December 9, 2020 10:46
* add some GA references

* more changes

* more changes
…atch

Packet logging fixes for visualization
Does not depend on minimal_model and contains data of both real & virtual mode
@atharva-2001 atharva-2001 force-pushed the convergence_plots_demo branch from 7a0bcca to f4f77c2 Compare June 8, 2021 17:36
@atharva-2001 atharva-2001 requested a review from marxwillia June 9, 2021 09:39
@atharva-2001 atharva-2001 force-pushed the convergence_plots_demo branch 2 times, most recently from 863403b to 9050ea2 Compare June 9, 2021 15:52
@atharva-2001 atharva-2001 force-pushed the convergence_plots_demo branch from 9050ea2 to 1fc7f91 Compare June 9, 2021 15:54
Copy link
Member

@jaladh-singhal jaladh-singhal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VBox solution looks great (moving iterations legends to above) but it affected the alignment of top & bottom plots' rightmost edge which was fine in combined plots. Maybe you can delve into CSS and reduce the width of above plot in a calculated way that alignment looks fine.

Also, I was thinking that VBox solution won't render in html notebooks, so sticking with combined plot (plotly sublot) will be more beneficial since it will render fine. Can you please search if plotly allows creating 2 legend boxes - then we can confine height of iterations' legend and scroll down won't happen.

And, can you give different colors to next boundary temperature and residual luminosity?

@jaladh-singhal
Copy link
Member

Also I noticed plot labels were not present and dots were present in luminosity plots (that we decided to remove) - I hope you'll fix that since you showed us plot with these changes right?

@jaladh-singhal
Copy link
Member

And one last thing - the 1st cell which widens entire notebook shouldn't be done. By default 1200px width of jupyter notebook should be respected because as per design principles, our eyes can only see that much width in one glance. This is the very reason many websites you see out there have content horizontally centered and confined in fixed width on desktop screens (leaving empty space on both left & right ends).

And you also need not to constraint height of vbox to 1000px - plotly plots are smart enough to adapt according to space available to them so let them be.

@atharva-2001
Copy link
Member Author

atharva-2001 commented Jun 18, 2021

Thanks for reviewing it!
I'm afraid plotly only allows one legend per graph at the moment. (Link to the discussion). I did however find a workaround, pinning the right margin of the plasma plot to 135, almost aligns the plots perfectly, but if someone changes the width of the cell, the plots move from the perfect alignment just a little bit.
I'm sorry for changing the width of the cell to 100%, I had done that to take a screenshot(to show the entire plot in one picture) :)

I found a way to show the plots on nbviewer as well in the documentation, but I did it by suppressing errors that showed up.
Here is the link to the documentation I built to show the plots.
Here is the link to the notebook on nbviewer.
If you are not able to view the plots, please try this link, as the notebook was probably not updated.

@atharva-2001 atharva-2001 force-pushed the convergence_plots_demo branch from 05f3617 to 32f94ce Compare June 18, 2021 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.