Skip to content

Bug fix - error when hovering pop up window#85

Merged
zingale merged 1 commit intopython-hydro:masterfrom
jmuzsik:master
Feb 9, 2020
Merged

Bug fix - error when hovering pop up window#85
zingale merged 1 commit intopython-hydro:masterfrom
jmuzsik:master

Conversation

@jmuzsik
Copy link
Copy Markdown

@jmuzsik jmuzsik commented Jan 13, 2020

Hi there,

This is in reference to #84.

For one, cb.formatter = matplotlib.ticker.FormatStrFormatter("") prevents a bug in matplotlib where it expects a formatter attribute. The current format does not break the animation but you will see it if you click a chart while it is running and look in your terminal. It adds x and y axis data related to the chart as well as an []. The empty array has data by default that is quite meaningless so FormatStrFormatter("") gets rid of the data inside.

My first instinct to fix this was this: img = plt.imshow(np.transpose(var.v()), and plt.colorbar(img) because of this stack overflow page. I kept this change in code as it looks to be a best practice (though I am not sure the exact benefit).

Otherwise, let me know if it works.

Jerry

@jmuzsik jmuzsik requested a review from zingale January 17, 2020 16:48
@zingale zingale merged commit 270bcc3 into python-hydro:master Feb 9, 2020
@zingale
Copy link
Copy Markdown
Collaborator

zingale commented Feb 9, 2020

thanks for reporting this and for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants