Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Enhance my stacked barplot title, and flip legend
I've got most everything in order with my stacked barplot

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?
I've tried:
plt.legend(names[1:], handles[::-1], labels[::-1])
but it gives me an error:
plt.legend(names[1:], handles[::-1], labels[::-1]) NameError: name 'handles' is not defined

Top Page

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

Forum Jump:

Users browsing this thread: 1 Guest(s)