Skip to content

Feature #558 bar, box, histogram, revision_box#568

Merged
georgemccabe merged 63 commits intofeature_555_replace_plotlyfrom
feature_558_bar
Mar 9, 2026
Merged

Feature #558 bar, box, histogram, revision_box#568
georgemccabe merged 63 commits intofeature_555_replace_plotlyfrom
feature_558_bar

Conversation

@georgemccabe
Copy link
Contributor

@georgemccabe georgemccabe commented Mar 5, 2026

Pull Request Testing

  • Describe testing already performed for these changes:

Generated plots and reviewed differences from 555 branch

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

Explanation of diffs:

bar, box, histogram, revision_box - these are plots that have been switched to use matplotlib instead of plotly. The image sizes are different and the legend is properly displayed now. Please review these carefully and provide any feedback.

hovmoeller - differences are due to a bug that was introduced in feature_555 that was fixed in this PR. The non-plotly version of the Config object was accidentally being used, which caused the image size to change. The image generated by this branch actually looks more like the original from develop, although the "incorrect" one is bigger and has more details. The json file is also reverted back to the original, without the height and width specified. This will likely change again when we switch this plot to using matplotlib.

scatter - plot difference is fixing another bug where the plot contains the data/content of the performance_diagram plot instead of the scatter plot data/content. This was due to the plt object not being cleared out properly after each image is created.

performance_diagram - the size of the plot has changed, but the content is the same. This is because changed the base_plot.save_to_file function to call plt.savefig with the dpi set from the config and call plt.close('all') to clear the plot content. I changed the plots that call plt.savefig explicitly to call this function instead to be consistent. The new output uses the dpi value from the config (72) instead of the default (100).

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

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

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

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

See above

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

    If yes, please describe:

  • Please complete this pull request review by 3/9/2026.

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.

bikegeek and others added 30 commits January 21, 2026 13:53
…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
…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.
…le plots. Handle logging and error raising within helper function. Provided a default list of lists to check against the number of series, with the option to override and change per plot as needed. Improve error messages to describe with specific config option has an inconsistent number of values compared to the number of series to assist with debugging
…ues for show_legend that were being interpreted as a list of single characters instead of boolean values
…hat RevisionBoxConfig can inherit from BoxConfig
… after creating the image so the plot content is not leftover, potentially being added to other plots. Also update the hovmoeller plot to inherit from the plotly versions of the base components because it uses plotly
…fig directly so the logic to close the plt object after the image is generated is called consistently and upon failure to write the plot. Add optional arguments in save_to_file to pass to plt.savefig to handle taylor diagram different settings based on plotting just positive or negative/positive
@georgemccabe georgemccabe added this to the METplotpy-4.0.0 milestone Mar 5, 2026
@georgemccabe georgemccabe requested a review from bikegeek March 5, 2026 18:36
@github-project-automation github-project-automation bot moved this to 🩺 Needs Triage in METplus-7.0 Development Mar 5, 2026
@georgemccabe georgemccabe moved this from 🩺 Needs Triage to 🏗 In progress in METplus-7.0 Development Mar 5, 2026
@georgemccabe georgemccabe moved this from 🏗 In progress to 🔎 In review in METplus-7.0 Development Mar 5, 2026
@georgemccabe georgemccabe linked an issue Mar 5, 2026 that may be closed by this pull request
… to place annotation text at top left of plot regardless of config settings
Co-authored-by: MWin <3753118+bikegeek@users.noreply.github.com>
@georgemccabe georgemccabe merged commit e166cc2 into feature_555_replace_plotly Mar 9, 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 9, 2026
@georgemccabe georgemccabe deleted the feature_558_bar branch March 9, 2026 15:03
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 bar, box, and histogram plot

2 participants