|
From: mgurling <mag...@gm...> - 2012-10-08 03:40:39
|
I called plt.pie with autopct='%1.1f%%' and got the labels I wanted. However, when I added the line mpl.rcParams['text.usetex'] = True the % disappeared from my labels. I'd like to be able to use LaTex for text, but can't figure out how to get the % back on my labels. I've read the documentation for autopct > autopct: [ None | format string | format function ] > If not None, is a string or function used to label the wedges with > their numeric value. The label will be placed inside the wedge. If it is a > format string, the label will be fmt%pct. If it is a function, it will be > called. and I am wondering what a format function would look like. All of the examples using autopct that I can find use a format string similar to %1.1f%% and none seem to use functions. So my questions are: 1) How might I get the % back on my labels (whether this requires a format function or not)? 2) What would a format function look like when used with autopct? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/What-is-a-autopct-format-function-tp39315.html Sent from the matplotlib - users mailing list archive at Nabble.com. |