data-science-notes | source project hosted at https : //makeuseofdata.com | Data Visualization library
kandi X-RAY | data-science-notes Summary
kandi X-RAY | data-science-notes Summary
Open-source project hosted at to crowdsource a robust collection of notes related to data science (math, visualization, modeling, etc)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of data-science-notes
data-science-notes Key Features
data-science-notes Examples and Code Snippets
Community Discussions
Trending Discussions on data-science-notes
QUESTION
I have a pandas DataFrame with a secondary y axis and I need a bar plot with the legend in front of the bars. Currently, one set of bars is in front of the legend. If possible, I would also like to place the legend in the lower-left corner. Any ideas appreciated!
I have attempted to set the legend=false and add a custom legend, but it has the same issue. I've tried reordering the columns but there's no way to clear a space for this on the chart.
...ANSWER
Answered 2019-Jul-03 at 20:13You can create the legend yourself.
Use the color cycler to get the colors correct when zipped with the columns. Make sure to set legend=False
in the barplot. loc=3
is the lower left.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install data-science-notes
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page