Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Str Categorical Axis Support #6689
Conversation
story645
added ongoing needs_review In Progress gsoc
labels
Jul 5, 2016
story645
self-assigned this
Jul 5, 2016
story645
removed the
In Progress
label
Jul 5, 2016
tacaswell
commented on an outdated diff
Jul 6, 2016
tacaswell
and 1 other
commented on an outdated diff
Jul 6, 2016
tacaswell
commented on an outdated diff
Jul 6, 2016
| units and units conversion. Use cases include converters for custom | ||
| objects, e.g., a list of datetime objects, as well as for objects that | ||
| -are unit aware. We don't assume any particular units implementation, | ||
| -rather a units implementation must provide a ConversionInterface, and | ||
| -the register with the Registry converter dictionary. For example, | ||
| +are unit aware. We don't assume any particular units implementation; | ||
| +<<<<<<< HEAD | ||
| +rather a units implementation must provide the register with the Registry | ||
| +======= |
|
|
tacaswell
commented on an outdated diff
Jul 6, 2016
| + @staticmethod | ||
| + def axisinfo(unit, axis): | ||
| + seq, locs = zip(*axis.unit_data) | ||
| + majloc = StrCategoryLocator(locs) | ||
| + majfmt = StrCategoryFormatter(seq) | ||
| + return units.AxisInfo(majloc=majloc, majfmt=majfmt) | ||
| + | ||
| + @staticmethod | ||
| + def default_units(data, axis): | ||
| + # the conversion call stack is: | ||
| + # default_units->axis_info->convert | ||
| + axis.unit_data = map_categories(data, axis.unit_data) | ||
| + return None | ||
| + | ||
| + | ||
| +def map_categories(data, old_map=[], sort=True): |
tacaswell
Owner
|
tacaswell
added this to the
2.1 (next point release)
milestone
Jul 7, 2016
|
Can you revert the merge of master into this branch? |
|
Ah, I see there are a bunch of them, I will see if I can de-tangle this. |
|
If you look at the category branch on my gh I have cherry-picked off all of your commits and rebased them onto current master. The changes to the code are exactly the same, but the history is cleaner 22:15 $ git diff story645/category tacaswell/categoryshows that there are no code changes. I suggest you do the following
If you have not discovered magit (https://github.com/magit/magit) yet, I can not suggest it highly enough. |
|
appveyor failure is spurious (failed upload, tests passed). |
tacaswell
merged commit 5c1e64d
into matplotlib:master
Jul 8, 2016
tacaswell
removed the
needs_review
label
Jul 8, 2016
|
appveyor failure is spurious (failed upload, tests passed). The plan is to collect a single what_new entry + examples towards the end. |
|
|
story645 commentedJul 5, 2016
•
edited
Cleaned up and updated version of #6612, this adds support for directly plotting lists of strings, so that the following is now possible:
Now fighting with the update ticks (@tacaswell) use case:
'cause it breaks in randomly different ways without the other tests failing.
And beats my why, but Python2.7 triggers weirdness with the bounds & view_limits that Python3.5 doesn't:
this was 'caused by
plt.plot('a')