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

Added option for keyword arguments in the TardisSpectrum's plot method #1477

Merged
merged 1 commit into from Mar 24, 2021

Conversation

aribalam
Copy link
Contributor

Description

This PR is a feature request to facilitate the option of adding keyword arguments to the plot function of the TardisSpectrum to provide more flexibility in plotting the spectrum using matplotlib.

Motivation and Context

The current implementation of the plot function of TardisSpectrum does not provide any flexibility in plotting the spectrums.

For example, using the Tardis Example setup, the spectrum plot in normal packet mode can be plotted using below code -

But in order to plot spectrums in different modes in the same figure with proper legends, the code is below -

With this feature, the code reduces down to -

Similarly, more customizations can be made to the plots this way, just by adding the required keyword arguments in the function the way it is done in matplotlib.

How Has This Been Tested?

  • Testing pipeline
  • Reference Data Comparison following these instructions
  • Other (please describe)

Screenshots (if appropriate):

Given in Description

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • None of the above (please describe)

Checklist:

  • My code follows the code style of this project
  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have built the documentation on my fork following these instructions
  • I have assigned and requested two reviewers for this pull request

@codecov
Copy link

codecov bot commented Mar 13, 2021

Codecov Report

Merging #1477 (ec81d7c) into master (9497250) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1477   +/-   ##
=======================================
  Coverage   71.13%   71.13%           
=======================================
  Files          67       67           
  Lines        5523     5523           
=======================================
  Hits         3929     3929           
  Misses       1594     1594           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9497250...f5aac40. Read the comment docs.

@aribalam
Copy link
Contributor Author

@wkerzendorf @epassaro Could you review it please?

Copy link
Contributor

@marxwillia marxwillia left a comment

Choose a reason for hiding this comment

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

This is a good idea to add.

@epassaro
Copy link
Member

probably this is on @jaladh-singhal side of the project

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.

@aribalam wow! very thoughtful 👍

@andrewfullard andrewfullard merged commit f545ede into tardis-sn:master Mar 24, 2021
andrewfullard pushed a commit that referenced this pull request May 20, 2021
* changed example according to new feature

* [build docs]
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
atharva-2001 pushed a commit to atharva-2001/tardis that referenced this pull request Oct 1, 2021
* changed example according to new feature

* [build docs]
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.

None yet

5 participants