|
From: Benjamin R. <ben...@ou...> - 2011-08-11 17:55:21
|
On Thu, Aug 11, 2011 at 11:21 AM, WALTER Alain <ala...@th... > wrote: > Hi Ben, > I don't want to display rotate text ! I just need to display a simple text > to my figure : > > ax.text(onevolume['long'][i],onevolume['lat'][i],onevolume['upper'][i],onevolume['point'][i],color=linecolor) > In addition, I do not understand your remark about GDK, If I remember, I > need to use the following modules because FigureCanvas and NavigationToolbar > are required. > from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas > from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as > NavigationToolbar > > Anyway I cannot reproduce the warning, it is a little bit strange ! > Thank you > > Disregard what I said earlier. I didn't see that you were not trying to rotate your text in the first place. What is an example value for "onevolume['point'][i]"? The function signature for ax.text() is that the first 2 positional arguments are the coordinates, the third is the string to display (I would presume that "onevolume['upper'][i]" has something to do with the text you are displaying). However, the "onevolume['point'][i]" is in the position for the fontdict parameter of the function call. This dictionary overrides the default text properties, which I believe include properties like the rotation angle. Ben Root |