Skip to content

Feature #569 ROC diagram, reliability diagram, and ens_ss - plotly to matplotlib#570

Merged
georgemccabe merged 106 commits intofeature_555_replace_plotlyfrom
feature_569_roc
Mar 13, 2026
Merged

Feature #569 ROC diagram, reliability diagram, and ens_ss - plotly to matplotlib#570
georgemccabe merged 106 commits intofeature_555_replace_plotlyfrom
feature_569_roc

Conversation

@georgemccabe
Copy link
Contributor

Pull Request Testing

  • Describe testing already performed for these changes:

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes or No]

  • Do these changes include sufficient testing updates? [Yes or No]

  • Will this PR result in changes to the test suite? [Yes or No]

    If yes, describe the new output and/or changes to the existing output:

  • Do these changes introduce new SonarQube findings? [Yes or No]

    If yes, please describe:

  • Please complete this pull request review by [Fill in date].

Pull Request Checklist

See the METplus Workflow for details.

  • Add any new Python packages to the METplus Components Python Requirements table.
  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or METplotpy-X.Y.Z Development project for official releases
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

georgemccabe and others added 30 commits September 30, 2025 17:50
* Updated the release_date

* Removed the -rc1 suffix for coordinated release

* Updated for coordinated release

* Rotate authorship for coordinated release

* Update year of copyright date

* Per #550, modify formatting of release notes header

* Per #550, attempting to resolve SonarQube error with regard to coverage

Add source and omit settings for coverage tool

* Per #550, correcting syntax

Updated source paths for coverage tool and adjusted omit settings.

* Per #550, update coverage omit pattern for _netCDF4.pyx

* Per #550, another attempt to resolve the SonarQube error

* Per #550, another attempt to resolve the SonarQube error

Updated coverage configuration to omit specific files.

* Update pyproject.toml

move the omit from the tool.coverage.report to the tool.coverage.run to see if the histogram_2d/src/netCDF4 can be omitted from the trace

* Update pyproject.toml

try [run] source=. to prevent measuring code outside of project

* remove the [run] block, this causes issues with another GHA

* add source=. to only check the METplotpy source code and not third party libraries

* Use different syntax to omit the histogram_2d/src from report

* Return to original state, moved omit to the .coveragec config

* Update pyproject.toml

remove extraneous line

* Update release-notes.rst

* Update conf.py

---------

Co-authored-by: Julie Prestopnik <jpresto@ucar.edu>
…g.py. Updated plots that use plotly to import from those versions so it is clear which plots still rely on plotly and need to be updated. This will also allow optional support of plotly for certain plots if we are not able to fully get rid of the plotly dependency in this development cycle. Also removed some unused imports. Replaced util.py function apply_weight_style with get_font_params since the existing version will not be able to be used with matplotlib
…y matplotlib. Instead set xaxis label weight similar to taylor_diagram logic
…feature_556_copy_base_and_common_functionality
…tring 9999 to integer 9999 and use np.nan instead of string 'NA'
…causes yaml configurations for lines to be ignored
…feature_556_copy_base_and_common_functionality
update copyright year
…feature_556_copy_base_and_common_functionality
…units. added helper function to reduce duplication for logic to convert units
…l and y-axis label style, weight, and font size. Moved the add_horizontal_line() and add_vertical_line() code from the util.py module to this module as this will be needed for all plot types. TODO comments are used to denote code that will need to be removed when all plot types have migratee to Matplotlib.
@georgemccabe georgemccabe added this to the METplotpy-4.0.0 milestone Mar 12, 2026
@georgemccabe georgemccabe requested a review from bikegeek March 12, 2026 21:17
@github-project-automation github-project-automation bot moved this to 🩺 Needs Triage in METplus-7.0 Development Mar 12, 2026
@georgemccabe georgemccabe moved this from 🩺 Needs Triage to 🔎 In review in METplus-7.0 Development Mar 12, 2026
@georgemccabe georgemccabe linked an issue Mar 12, 2026 that may be closed by this pull request
23 tasks
Args:
Returns:
"""
# set the range of the x-axis and y-axis to range from 0 to 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

are lines 311 and 312 needed? they are the same and are commented out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had left this code commented to check if I needed to add similar functionality using matplotlib.

It looks like the ROC diagram plots showed values from 0-1 already, but I added explicit limits for the x- and y-axis to ensure that it always is. Currently, the xticks don't default to 0-1 by 0.1, but I could add something to force this if the indy_labels/vals are not set.

# ))

self.logger.info(f"Finished creating figure: {datetime.now()}")
# can't support number of columns in legend, can only choose
Copy link
Collaborator

Choose a reason for hiding this comment

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

lines 328-335 are commented out, is this code still useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I can tell, this isn't doing anything that isn't already supported, but maybe I don't understand what its intention is. I removed it, but let me know you think I should revisit this.

Copy link
Collaborator

@bikegeek bikegeek left a comment

Choose a reason for hiding this comment

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

just a few minor comments, I'll let you decide whether to heed them or not.

Removed commented-out code for series plotting.
…functionality covered in those code blocks -- set x- and y-axis limits to 0-1 for ROC diagram plots and use draw_box config variable to determine if box around legend should be displayed or not
@georgemccabe georgemccabe requested a review from bikegeek March 13, 2026 14:43
@georgemccabe georgemccabe merged commit 9b3bf89 into feature_555_replace_plotly Mar 13, 2026
13 of 15 checks passed
@github-project-automation github-project-automation bot moved this from 🔎 In review to 🏁 Done in METplus-7.0 Development Mar 13, 2026
@georgemccabe georgemccabe deleted the feature_569_roc branch March 13, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏁 Done

Development

Successfully merging this pull request may close these issues.

Remove plotly: Update ROC diagram, Reliability diagram, and ens_ss plots

4 participants