question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scatter plotting tests fail for recent matplotlib version

See original GitHub issue

With matplotlib version 3.1.1 installed, some pyam plotting tests fail. More specifically, test_scatter, test_scatter_variables_with_meta_color, test_scatter_with_lines, and test_scatter_meta fail, because of IndexError: list index our of range, pyam\plotting.py:605 when:

pyam\core.py:1293: in scatter
    ax = plotting.scatter(df.dropna(), x, y, **kwargs)
pyam\plotting.py:605: in scatter
    handles = [handles[i] for i in idxs]

With matplotlib version 3.0.2 all of the aforementioned tests pass.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
awais307commented, Jan 29, 2020

The pyam requirement for an outdated (3.0.2) version of matplotlib is causing difficulties on my system, where another code requires the latest matplotlib. So I am forced to have two conda environments; one for any code using pyam and other one requiring latest matplotlib version.

0reactions
znichollscommented, May 11, 2020

IMHO, the actual fix should be to adjust pyam to work properly with the latest matplotlib; not to force any other software using pyam to run an outdated matplotlib.

Although I fully agree with this (but acknowledge that anything to do with plotting and plotting tests is super hard).

Read more comments on GitHub >

github_iconTop Results From Across the Web

mpl_toolkits basemap scatter plot error - python
This command ( ax.hold ) has been depreciated as of matplotlib version 2.x. So there is nothing we can do about it, until...
Read more >
Scatter plot — Matplotlib 3.6.2 documentation
This example showcases a simple scatter plot. The use of the following functions, methods, classes and modules is shown in this example: matplotlib....
Read more >
Resolved: Matplotlib figures not showing up or displaying
The issue actually stems from the matplotlib backend not being properly set, or from a missing dependency when compiling and installing ...
Read more >
Visualizing Data in Python Using plt.scatter()
In this tutorial, you'll learn how to create scatter plots in Python, which are a key part of many data visualization applications.
Read more >
pandas.DataFrame.plot — pandas 1.5.2 documentation
axmatplotlib axes object, default None. An axes of the current figure. ... Changed in version 1.2.0: Now applicable to planar plots ( scatter...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found