Re: [Matplotlib-users] Legend orientation and layout
Gerardo == Gerardo Rivera [EMAIL PROTECTED] writes: Gerardo Hi, I'm currently using matplotlib with Plone/Zope to Gerardo generate some graphics for temperature, wind speed and Gerardo wind direction based on some data from Lake Tahoe. Gerardo However, the currently layout of the legends box really Gerardo restricts me from displaying the full set of data points Gerardo on one graph. Gerardo Currently the legend layout is displayed as: Gerardo line1_color label1 line2_color label2 line3_color label3 Gerardo ... Gerardo we want horizontal layout: Gerardo line1_color label1 line2_color label2 line3_color label3 Gerardo ... Gerardo Also placing the horizontal layout below the x-axis title Gerardo would be ideal. Gerardo Is there a way to create the horizontal layout in the Gerardo current version of matplotlib? No, there isn't, but patches here would be most welcome since this has come up before JDH - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Legend orientation and layout
John, Thanks for the information. I might start looking at the code and see if I can make any changes. If I'm successful then I'll submit these as patches. Gerardo No, there isn't, but patches here would be most welcome since this has come up before JDH - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend orientation
Lionel == Lionel Roubeyrie [EMAIL PROTECTED] writes: Lionel Hi all, I have some minor problems with legend, but I Lionel don't find how to figure out: - if the figure contains Lionel only one plot, the text orientation of the legend is Lionel vertical. How can I change this? - when plots are in '-' Lionel style without markers, the lines are not shown in the Lionel legend, I just have text. thanks -- Lionel Roubeyrie - Lionel [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr Make sure you pass in a list of strings, and not a single string. If you have just a single string, it interprets it as a list of characters. JDH s = 'mylabel' line, = plot(something) legend([line], [s]) Note the comma in line, = plot(something) which performs tuple unpacking of a list of lines. plot returns a list of lines, so you could also do lines = plot(something) legend(lines, [s]) but not lines = plot(something) legend(lines, s) because then you have a list of lines and a sequence of characters. JDH - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend orientation
Le mardi 26 septembre 2006 14:22, John Hunter a écrit : Make sure you pass in a list of strings, and not a single string. If you have just a single string, it interprets it as a list of characters. JDH Yes, I have seen my error too late, thanks. But I can't get a line in the legend, just markers? -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend orientation
Lionel == Lionel Roubeyrie [EMAIL PROTECTED] writes: Lionel Yes, I have seen my error too late, thanks. But I can't Lionel get a line in the legend, just markers? I'm not sure what you are trying to do here. How about ax = subplot(111) ax.plot([1,2,3], '-', label='a line') ax.legend() JDH - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend orientation
Le mardi 26 septembre 2006 16:29, John Hunter a écrit : I'm not sure what you are trying to do here. How about ax = subplot(111) ax.plot([1,2,3], '-', label='a line') ax.legend() I don't know if it's a normal way with mpl, but with your example or with my datas, the legend doesn't have a line beside the text, just the space for it. If I use linestyle='o', the marked is drawn. -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users