Bottom Page

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
İmage

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
Quote

Top Page

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

Forum Jump:


Users browsing this thread: 1 Guest(s)