PosTag does not sort xticklabels in frequency mode
See original GitHub issueDescribe the bug I noticed a strange behavior while working with PosTag visualizer. When in frequency mode it does sort the bars but the x tick labels remain in the initial order.
To Reproduce
corpus = load_corpus('data/hobbies')
docs = corpus.data
labels = corpus.target
tagged_stanzas = [nltk.pos_tag(nltk.word_tokenize(sent)) for sent in docs]
tag = [tagged_stanzas]
_, (ax1,ax2) = plt.subplots(1,2)
viz = PosTagVisualizer(ax=ax1)
viz.fit(tag)
viz.poof()
viz.ax.grid(False)
oz = PosTagVisualizer(frequency=True, ax=ax2)
oz.fit(tag)
oz.poof()
oz.ax.grid(False)
where load_corpus is the function from yellowbrick contributing section
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Matplotlib set x tick labels does not swap order - Stack Overflow
Use matplotlib's categorical feature. You may predetermine the order of categories on the axes by first plotting something in the correct ...
Read more >Set or query x-axis tick labels - MATLAB xticklabels - MathWorks
m = xticklabels('mode') returns the current value of the x-axis tick labels mode, which is either 'auto' or 'manual' . By default, the...
Read more >ELOQUENT SCIENCE - Weather and Climate Laboratory
individuals searching for “Johnstown flood 1977” may not find your manu- script. Using common word order will also help your article be found...
Read more >How to change the tick frequency on x or y axis in matplotlib
and the x axis' ticks are plotted in intervals of 5. ... You could explicitly set where you want to tick marks with...
Read more >Untitled
Baby won't nap on vacation, Oracle purchasing setup, Jalalpur jattan city. ... Spatial frequency selectivity, Glutton's tools, Hotondo seaspray 386, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes it was fixed but we did not add tests for it. I will fix it with my new PR that adds helper function for stack bar charts.
This will likely be fixed in #847 - thanks @naresh-bachwani!