Skip to content

Commit

Permalink
dropna in lineplot to get rid of no lines due to nans (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
gidden authored and danielhuppmann committed Aug 9, 2018
1 parent 01a4d72 commit e9b3916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

- (#80)[https://github.com/IAMconsortium/pyam/pull/80] Extend the pseudo-regexp syntax for filtering in `pattern_match()`
- (#73)[https://github.com/IAMconsortium/pyam/pull/73] Adds ability to remove labels for markers, colors, or linestyles
- (#72)[https://github.com/IAMconsortium/pyam/pull/72] line_plot now drops NaNs so that lines are fully plotted
- (#71)[https://github.com/IAMconsortium/pyam/pull/71] Line plots `legend` keyword can now be a dictionary of legend arguments
- (#70)[https://github.com/IAMconsortium/pyam/pull/70] Support reading of both SSP and RCP data files downloaded from the IIASA database.
- (#66)[https://github.com/IAMconsortium/pyam/pull/66] Fixes a bug in the `interpolate()` function (duplication of data points if already defined)
Expand Down
1 change: 1 addition & 0 deletions pyam/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ def line_plot(df, x='year', y='value', ax=None, legend=None, title=True,
else:
pargs[key] = var
kwargs.update(pargs)
data = data.dropna()
data.plot(ax=ax, **kwargs)
if labels:
ax.lines[-1].set_label(' '.join(labels))
Expand Down

0 comments on commit e9b3916

Please sign in to comment.