Skip to content

Add Line and Refactor chart object #21

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

Merged
merged 24 commits into from
Aug 20, 2018

Conversation

kdorr
Copy link
Collaborator

@kdorr kdorr commented Aug 14, 2018

This has all of the changes from #20, so this PR can be merged without merging #20.

Refactor: adding a chart object

Major refactor to create a chart object that parses the altair chart and stores relevant data and metadata conveniently for mpl-altair. Suggestions for better names for the object are welcome.

Add Line

Converts line plots (all data types) successfully. Does not handle legend information.

Notes:

  • _data. _locate_channel_data() was changed to convert temporal data to matplotlib dates before returning the data rather than letting the data conversion happen elsewhere.
  • Slight behavior difference between Altair and mpl-altair: Altair won't render line plots where the column for opacity groups the data into a different shape than the column for color or stroke. mpl-altair renders this, but it's not meaningful at all.

kdorr and others added 24 commits August 14, 2018 12:46
Cleaner way to group the data for opacity, stroke, and color encodings.
In the process of working on this, it was necessary to have
_data._locate_channel_data() convert temporal data to matplotlib dates
rather than wait for another function to convert the dates.
Cleaner way to group the data for opacity, stroke, and color encodings.
In the process of working on this, it was necessary to have
_data._locate_channel_data() convert temporal data to matplotlib dates
rather than wait for another function to convert the dates.
@codecov
Copy link

codecov bot commented Aug 14, 2018

Codecov Report

Merging #21 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #21   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          10     13    +3     
  Lines         585    589    +4     
  Branches       59     62    +3     
=====================================
+ Hits          585    589    +4
Impacted Files Coverage Δ
mplaltair/tests/test_data.py 100% <100%> (ø) ⬆️
mplaltair/_marks.py 100% <100%> (ø)
mplaltair/parse_chart.py 100% <100%> (ø)
mplaltair/tests/test_parse_chart.py 100% <100%> (ø)
mplaltair/_axis.py 100% <100%> (ø) ⬆️
mplaltair/_convert.py 100% <100%> (ø) ⬆️
mplaltair/_data.py 100% <100%> (ø) ⬆️
mplaltair/tests/test_convert.py 100% <100%> (ø) ⬆️
mplaltair/tests/test_axis.py 100% <100%> (ø) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7bcab2d...da74595. Read the comment docs.

@kdorr kdorr mentioned this pull request Aug 15, 2018
@story645 story645 merged commit 337ab54 into matplotlib:master Aug 20, 2018
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