Quantcast
Channel: Wrapping long y labels in matplotlib tight layout using setp - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by boblatouffe for Wrapping long y labels in matplotlib tight layout using setp

$
0
0

If you are looking for a fast way to wrap your labels dynamically, you can simply replace '' by '\n' like this :

wrapped_labels = [ label.replace('', '\n') for label in labels ]

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>