Python Forum
Enhance my stacked barplot title, and flip legend
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enhance my stacked barplot title, and flip legend
#1
I've got most everything in order with my stacked barplot
[Image: Screenshot-95.png]
but I am missing two things:
1) Can I have multiple title lines, each to which I can apply different text properties?
plt.title("Title line 1",fontsize=20)
#One of them will be bold
#Two of them will be one color and the third another color
#Two will be center aligned and the third left aligned
2) Can I flip the legend upside down?
plt.legend(names[1:])
I've tried:
plt.legend(names[1:], handles[::-1], labels[::-1])
but it gives me an error:
Error:
plt.legend(names[1:], handles[::-1], labels[::-1]) NameError: name 'handles' is not defined
Reply


Messages In This Thread
Enhance my stacked barplot title, and flip legend - by Clunk_Head - Jul-08-2019, 03:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  stacked autoencoder training JohnMarie 0 2,620 Feb-24-2019, 12:23 AM
Last Post: JohnMarie
  [Plot a stacked bar graph using plotly offline mode] niks250891 1 5,169 Apr-22-2018, 02:11 PM
Last Post: niks250891
  How to plot legend for a colormap? Felipe 1 4,185 Jun-05-2017, 06:58 PM
Last Post: Felipe
  Stacked Barchart from Counter using matplotlib alicarlos13 4 8,501 Mar-31-2017, 08:17 PM
Last Post: alicarlos13

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020