## Re: [Matplotlib-users] text annotation

 Re: [Matplotlib-users] text annotation From: Benoist Laurent - 2010-12-16 08:19:18 Attachments: text/plain ```Sorry for the delay. This is the script is used (modified so that it include the data). Le 15 déc. 10 à 16:50, Benjamin Root a écrit : > On Wed, Dec 15, 2010 at 9:46 AM, Benoist Laurent > wrote: > Hi all, > > I'm still a bit stuck with this probleme of polar annotation. > Let me present the problem in a different way. > > I've got the center of my circle, its radius and even some points on > the circle. > Actually, I'd like to annotate these points (red crosses in the > joined picture). > How would you do that? > > My best try gave me the green numbers. > > Thanks in advance, > Ben > > > > Can you include the source code (if it is simple) that you used to > generate this example, and we could probably help you out. > > Ben Root > ```

 [Matplotlib-users] text annotation From: Benoist Laurent - 2010-11-26 13:06:55 ```Hi, I'm a new matplotlib user and I'm already impressed by matplotlib's features! But I can't find how to do something that looks quite easy. I have several points making something that looks like a circle. I would like to anotate these point. How can I manage the annotation of points forming a circle if I have their coordinates? Any help would be appreciate. Thank you. Ben ```
 Re: [Matplotlib-users] text annotation From: Alan G Isaac - 2010-11-26 13:13:22 ```On 11/26/2010 8:12 AM, Benoist Laurent wrote: > How can I manage the annotation of points forming a circle if I have > their coordinates? http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.annotate http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.text http://matplotlib.sourceforge.net/examples/api/joinstyle.html hth, Alan Isaac ```
 Re: [Matplotlib-users] text annotation From: Benoist Laurent - 2010-11-26 13:35:32 ```Thank you for your answer. I read the text and annotate manual pages. I don't understand how the "polar" xycoords/textcoords works. I guess I should use this but its not clear to me. Le 26 nov. 10 à 14:13, Alan G Isaac a écrit : > On 11/26/2010 8:12 AM, Benoist Laurent wrote: >> How can I manage the annotation of points forming a circle if I have >> their coordinates? > > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.annotate > > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.text > > http://matplotlib.sourceforge.net/examples/api/joinstyle.html > > hth, > Alan Isaac > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win \$500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with > the > Intel(R) Software Partner Program. Five \$500 cash prizes are up for > grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ```
 Re: [Matplotlib-users] text annotation From: Benoist Laurent - 2010-12-15 15:38:50 Attachments: text/plain ```Hi all, I'm still a bit stuck with this probleme of polar annotation. Let me present the problem in a different way. I've got the center of my circle, its radius and even some points on the circle. Actually, I'd like to annotate these points (red crosses in the joined picture). How would you do that? My best try gave me the green numbers. Thanks in advance, Ben Le 26 nov. 10 à 14:41, Benoist Laurent a écrit : > Thank you for your answer. > I read the text and annotate manual pages. > > I don't understand how the "polar" xycoords/textcoords works. > I guess I should use this but its not clear to me. > > > > > Le 26 nov. 10 à 14:13, Alan G Isaac a écrit : > >> On 11/26/2010 8:12 AM, Benoist Laurent wrote: >>> How can I manage the annotation of points forming a circle if I have >>> their coordinates? >> >> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.annotate >> >> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.text >> >> http://matplotlib.sourceforge.net/examples/api/joinstyle.html >> >> hth, >> Alan Isaac >> >> ------------------------------------------------------------------------------ >> Increase Visibility of Your 3D Game App & Earn a Chance To Win \$500! >> Tap into the largest installed PC base & get more eyes on your game >> by >> optimizing for Intel(R) Graphics Technology. Get started today with >> the >> Intel(R) Software Partner Program. Five \$500 cash prizes are up for >> grabs. >> http://p.sf.net/sfu/intelisp-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users@... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win \$500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with > the > Intel(R) Software Partner Program. Five \$500 cash prizes are up for > grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > ```
 Re: [Matplotlib-users] text annotation From: Benjamin Root - 2010-12-15 15:50:38 Attachments: Message as HTML ```On Wed, Dec 15, 2010 at 9:46 AM, Benoist Laurent wrote: > Hi all, > > I'm still a bit stuck with this probleme of polar annotation. > Let me present the problem in a different way. > > I've got the center of my circle, its radius and even some points on the > circle. > Actually, I'd like to annotate these points (red crosses in the joined > picture). > How would you do that? > > My best try gave me the green numbers. > > Thanks in advance, > Ben > > > Can you include the source code (if it is simple) that you used to generate this example, and we could probably help you out. Ben Root ```
 Re: [Matplotlib-users] text annotation From: Benoist Laurent - 2010-12-16 08:19:18 Attachments: text/plain ```Sorry for the delay. This is the script is used (modified so that it include the data). Le 15 déc. 10 à 16:50, Benjamin Root a écrit : > On Wed, Dec 15, 2010 at 9:46 AM, Benoist Laurent > wrote: > Hi all, > > I'm still a bit stuck with this probleme of polar annotation. > Let me present the problem in a different way. > > I've got the center of my circle, its radius and even some points on > the circle. > Actually, I'd like to annotate these points (red crosses in the > joined picture). > How would you do that? > > My best try gave me the green numbers. > > Thanks in advance, > Ben > > > > Can you include the source code (if it is simple) that you used to > generate this example, and we could probably help you out. > > Ben Root > ```
 Re: [Matplotlib-users] text annotation From: Jae-Joon Lee - 2010-12-19 04:30:34 ```I don't think "polar" is a good fit for your case. Instead, you can simply use "data" coordinate with explicit coordinate transformation. Try something like; for i in xrange(5): theta = i*1.3+1.5 xx = center[0]+(radius-4)*math.cos(theta) yy = center[1]+(radius-4)*math.sin(theta) pyplot.annotate(str(i+1), (xx, yy), color='g', va="center", ha="center") -JJ On Thu, Dec 16, 2010 at 5:27 PM, Benoist Laurent wrote: > Sorry for the delay. > This is the script is used (modified so that it include the data). > > > > Le 15 déc. 10 à 16:50, Benjamin Root a écrit : > > On Wed, Dec 15, 2010 at 9:46 AM, Benoist Laurent wrote: >> >> Hi all, >> I'm still a bit stuck with this probleme of polar annotation. >> Let me present the problem in a different way. >> I've got the center of my circle, its radius and even some points on the >> circle. >> Actually, I'd like to annotate these points (red crosses in the joined >> picture). >> How would you do that? >> My best try gave me the green numbers. >> Thanks in advance, >> Ben >> > > Can you include the source code (if it is simple) that you used to generate > this example, and we could probably help you out. > > Ben Root > > > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ```
 Re: [Matplotlib-users] text annotation From: Benoist Laurent - 2010-12-21 09:34:46 ```Nice! Still some stuff to enhance but got it! Thanks a lot. Ben Le 19 déc. 10 à 05:30, Jae-Joon Lee a écrit : > I don't think "polar" is a good fit for your case. Instead, you can > simply use "data" coordinate with explicit coordinate transformation. > Try something like; > > for i in xrange(5): > theta = i*1.3+1.5 > xx = center[0]+(radius-4)*math.cos(theta) > yy = center[1]+(radius-4)*math.sin(theta) > pyplot.annotate(str(i+1), (xx, yy), color='g', va="center", > ha="center") > > -JJ > > > > On Thu, Dec 16, 2010 at 5:27 PM, Benoist Laurent > wrote: >> Sorry for the delay. >> This is the script is used (modified so that it include the data). >> >> >> >> Le 15 déc. 10 à 16:50, Benjamin Root a écrit : >> >> On Wed, Dec 15, 2010 at 9:46 AM, Benoist Laurent >> wrote: >>> >>> Hi all, >>> I'm still a bit stuck with this probleme of polar annotation. >>> Let me present the problem in a different way. >>> I've got the center of my circle, its radius and even some points >>> on the >>> circle. >>> Actually, I'd like to annotate these points (red crosses in the >>> joined >>> picture). >>> How would you do that? >>> My best try gave me the green numbers. >>> Thanks in advance, >>> Ben >>> >> >> Can you include the source code (if it is simple) that you used to >> generate >> this example, and we could probably help you out. >> >> Ben Root >> >> >> >> ------------------------------------------------------------------------------ >> Lotusphere 2011 >> Register now for Lotusphere 2011 and learn how >> to connect the dots, take your collaborative environment >> to the next level, and enter the era of Social Business. >> http://p.sf.net/sfu/lotusphere-d2d >> _______________________________________________ >> Matplotlib-users mailing list >> Matplotlib-users@... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > ```