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

Plotly does not produce bar chart data when there is missing data #332

Closed
22 tasks
bikegeek opened this issue Mar 30, 2023 · 0 comments · Fixed by #338
Closed
22 tasks

Plotly does not produce bar chart data when there is missing data #332

bikegeek opened this issue Mar 30, 2023 · 0 comments · Fixed by #338
Assignees
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue METplotpy: Plots priority: high High Priority requestor: METplus Team METplus Development Team required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone type: bug Fix something that is not working

Comments

@bikegeek
Copy link
Collaborator

Describe the Problem

First observed in METviewer. When attempting to generate a bar chart using Python (via plotly), no bars are present. However, when using the R-script code, the following plot is observed:

plot_20230330_172728

Expected Behavior

Using the following (remove the additional .txt extension from the files before using):
custom_bar.yaml.txt
plot_20230313_212614.xml.txt
plot_20230313_212614.data.txt

Create a bar plot:
bar

Environment

Describe your runtime environment:
1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop) all
2. OS: (e.g. RedHat Linux, MacOS) All OS
3. Software version number(s) METplotpy v 2.0.0 beta1

To Reproduce

Describe the steps to reproduce the behavior:
Clone the develop branch of METplotpy
copy the custom_bar.yaml.txt and plot_20230313_212614.data.txt to the METplotpy/metplotpy/plots/bar directory

Remove the .txt extension
Run the following:
python bar.py custom_bar.yaml

You will generate this plot:
bar

Post relevant sample data following these instructions:
https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk#ftp

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Organization level Project for support of the current coordinated release
  • Select Repository level Project for development toward the next official release or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next bugfix version

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of main_<Version>.
    Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
  • Fix the bug and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issues
    Select: Organization level software support Project for the current coordinated release
    Select: Milestone as the next bugfix version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    Branch name: bugfix_<Issue Number>_develop_<Description>
    Pull request: bugfix <Issue Number> develop <Description>
    Select: Reviewer(s) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Close this issue.
@bikegeek bikegeek added type: bug Fix something that is not working priority: high High Priority alert: NEED ACCOUNT KEY Need to assign an account key to this issue requestor: METplus Team METplus Development Team required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone METplotpy: Plots labels Mar 30, 2023
@bikegeek bikegeek added this to the METplotpy-2.1.0 milestone Mar 30, 2023
@bikegeek bikegeek self-assigned this Mar 30, 2023
bikegeek added a commit that referenced this issue Apr 7, 2023
…s['dbl_med']. Instead of sorting by the unique series.series_data[self.config_obj.indy_var], use the indy_vals defined in the user's config file. This will ensure that the number of y_points equals the number of x_points. If these aren't the same size, then no bars are plotted
@TatianaBurek TatianaBurek linked a pull request Apr 10, 2023 that will close this issue
13 tasks
bikegeek added a commit that referenced this issue Apr 11, 2023
* bugfix #332 added code to account for None values in the series_points['dbl_med'].  Instead of sorting by the unique series.series_data[self.config_obj.indy_var], use the indy_vals defined in the user's config file.  This will ensure that the number of y_points equals the number of x_points.  If these aren't the same size, then no bars are plotted

* bugfix #332 add image comparison test for bar plot with None values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue METplotpy: Plots priority: high High Priority requestor: METplus Team METplus Development Team required: FOR OFFICIAL RELEASE Required to be completed in the official release for the assigned milestone type: bug Fix something that is not working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant