Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Yann Tambouret
Along the lines of Mike's suggestion, I thought this could be done using Latex. I posted an answer on SO with an example of doing this, but it seems only to work with postscript backend. Other backends override the color with the mpl text color setting. Is there a way to prevent this override? F

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Paul Ivanov
Benjamin Root, on 2012-02-07 13:46, wrote: > Also, how deep should this rabbit hole go? I could imagine one could want > this for title() and figtitle(). Maybe it would be best to implement this > at the Text() constructor level? For this reason, I would discourage even implementing such functi

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Jason Grout
On 2/7/12 2:47 PM, Michael Droettboom wrote: > since this would never be full-fledged HTML anyway [1]. Famous last words, right? I'm curious: for the SVG backend, or a possible html5 canvas backend, can we already include html? I don't know, but I'm curious. Jason

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Michael Droettboom
In the past, I've thought having some sort of "HTML-lite" subset would be the most powerful here. So one could do: title("This is bold") Strictly speaking, for colors, one would do: title("This is red") but that's awfully verbose. I wouldn't have a problem fudging the spec and suppor

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Gökhan Sever
On Tue, Feb 7, 2012 at 12:46 PM, Benjamin Root wrote: > > > On Tue, Feb 7, 2012 at 1:15 PM, Gökhan Sever wrote: > >> I was basing my whitespace split idea on single string assumption --eg. >> no list passing. >> >> I do not have a strong preference on the final argument passing, as long >> as it

Re: [Matplotlib-users] How matplotlib got me a job

2012-02-07 Thread Patrick Marsh
Congratulations, Ben! That's an awesome story! I am by no means at the level of competence that Ben (or Ryan May, another matplotlib contributor and meteorology PhD student at OU) but have been able to turn what I've learned from lurking on the MPL listserv (as well as the Numpy/Scipy listservs)

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Benjamin Root
On Tue, Feb 7, 2012 at 1:15 PM, Gökhan Sever wrote: > I was basing my whitespace split idea on single string assumption --eg. no > list passing. > > I do not have a strong preference on the final argument passing, as long > as it works instead of manually placing the texts on figure or axis :) >

Re: [Matplotlib-users] How to make a colored bar chart with named items and values shown above each bar?

2012-02-07 Thread Tony Yu
On Tue, Feb 7, 2012 at 1:01 PM, Martin Mokrejs wrote: > Hi, > I would like to create a bar chart like the attached example but with the > addition > that each bar would have a different color. I tried to learn this from the > examples > on matplotlib web but still do not see a close example for t

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Gökhan Sever
I was basing my whitespace split idea on single string assumption --eg. no list passing. I do not have a strong preference on the final argument passing, as long as it works instead of manually placing the texts on figure or axis :) On Tue, Feb 7, 2012 at 11:52 AM, Ryan May wrote: > On Tue, F

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Ryan May
On Tue, Feb 7, 2012 at 12:49 PM, Gökhan Sever wrote: > This works as well, as long as it functions :) > > My idea requires little less typing. But forgot previously, text string > should be whitespace split. Right, but we shouldn't guess. If we automatically split on whitespace, this becomes hard

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Gökhan Sever
This works as well, as long as it functions :) My idea requires little less typing. But forgot previously, text string should be whitespace split. On Tue, Feb 7, 2012 at 11:43 AM, Benjamin Root wrote: > > > On Tue, Feb 7, 2012 at 12:38 PM, Gökhan Sever wrote: > >> Posted at https://github.com/m

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Benjamin Root
On Tue, Feb 7, 2012 at 12:38 PM, Gökhan Sever wrote: > Posted at https://github.com/matplotlib/matplotlib/issues/697 > > I think a syntax like: > > plt.ylabel("Sun is shining.", color='rgb') > > would be a good start. (Assuming len of string == len of colors) > > Don't know if I like that. It be

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Gökhan Sever
Posted at https://github.com/matplotlib/matplotlib/issues/697 I think a syntax like: plt.ylabel("Sun is shining.", color='rgb') would be a good start. (Assuming len of string == len of colors) On Tue, Feb 7, 2012 at 11:18 AM, Michael Droettboom wrote: > Nope. But it's something I've wanted

Re: [Matplotlib-users] rendering unicode using the PDF backend

2012-02-07 Thread Benjamin Root
On Tue, Feb 7, 2012 at 12:30 PM, Mark Janikas wrote: > I downloaded DejaVu Sans and pointed to that ttf file, and no love L… > Again, the default font seems to work for English, French, German, Spanish, > Italian other Euros etal… but Chinese and Arabic either come out blank > (default font, Deja

Re: [Matplotlib-users] rendering unicode using the PDF backend

2012-02-07 Thread Mark Janikas
I downloaded DejaVu Sans and pointed to that ttf file, and no love :(... Again, the default font seems to work for English, French, German, Spanish, Italian other Euros etal... but Chinese and Arabic either come out blank (default font, DejaVu Sans) or choke on the glyphs (MS Unicode). MJ Fro

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Michael Droettboom
Nope. But it's something I've wanted to add for a while. Can you file an Issue in the github tracker? Mike On 02/07/2012 11:40 AM, Gökhan Sever wrote: Is there a way in matplotlib to partially specify the color of a string? Example: plt.ylabel("Today is cloudy.") How can I show "today" as

[Matplotlib-users] How to make a colored bar chart with named items and values shown above each bar?

2012-02-07 Thread Martin Mokrejs
Hi, I would like to create a bar chart like the attached example but with the addition that each bar would have a different color. I tried to learn this from the examples on matplotlib web but still do not see a close example for that. ;-) many thanks, Martin <>-

Re: [Matplotlib-users] How matplotlib got me a job

2012-02-07 Thread Fernando Perez
On Tue, Feb 7, 2012 at 9:02 AM, Ethan Gutmann wrote: > > Also, congrats Ben, both on finishing the PhD and on the job. If you ever > find yourself in Boulder, CO (I'm at NCAR), let me know and I'll buy you a > drink. Indeed, congrats to Ben! And I'm very glad to see your many contributions to

Re: [Matplotlib-users] Change xaxis labels

2012-02-07 Thread Paul Ivanov
C M, on 2012-02-06 09:33, wrote: > On Mon, Feb 6, 2012 at 9:23 AM, David Craig wrote: > > > Hi, I have a plot and the xaxis shows number of seconds after a start > > point. I would like to convert them to days anyone know how to do this. > > I have looked at the documentation but cant find what

Re: [Matplotlib-users] How matplotlib got me a job

2012-02-07 Thread Ethan Gutmann
On Feb 7, 2012, at 1:42 AM, Friedrich Romstedt wrote: > I'd like to thank John and Ben for this inspiring posts, which showed > them from a side I've never seen so far. Show your hands if you're > thinking the same. I hope I didn't bore you all :-) Well said Friedrich, though I'm a relative newc

Re: [Matplotlib-users] Switch graphs

2012-02-07 Thread Paul Ivanov
Hi Phil, phils, on 2012-02-04 07:41, wrote: > Newbie to using matplotlib welcome to the party :) > Is it possible to use wx and have a window with say 2 buttons on where when > clicking on either button a different graph will appear using a different > data set. Any examples? Yes, it's possib

Re: [Matplotlib-users] [matplotlib-users] Is it possible to set .pdf as defaut when saving an image?

2012-02-07 Thread Michael Droettboom
On 02/07/2012 10:48 AM, Benjamin Root wrote: On Tue, Feb 7, 2012 at 8:33 AM, Fabien Lafont > wrote: Is it possible to set the extension .pdf as defaut when I save an image using the matplotlib bar. My coworkers are always saving the image in png and

[Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Gökhan Sever
Is there a way in matplotlib to partially specify the color of a string? Example: plt.ylabel("Today is cloudy.") How can I show "today" as red, "is" as green and "cloudy." as blue? Thanks. PS: Asked also on http://stackoverflow.com/questions/9169052/partial-coloring-of-text-in-matplotlib -- G

Re: [Matplotlib-users] [matplotlib-users] Is it possible to set .pdf as defaut when saving an image?

2012-02-07 Thread Benjamin Root
On Tue, Feb 7, 2012 at 8:33 AM, Fabien Lafont wrote: > Is it possible to set the extension .pdf as defaut when I save an > image using the matplotlib bar. My coworkers are always saving the > image in png and it's really ugly! > > Thx, > > Fab > > Interesting request. Looking through the backends

Re: [Matplotlib-users] rendering unicode using the PDF backend

2012-02-07 Thread Michael Droettboom
It looks like perhaps we'll need to "synthesize" glyph names if they aren't provided in the font (though it's not clear to me why they are not). This will be difficult to test for, as that's a proprietary font. Have you tried using another Unicode font, such as DejaVu Sans? Mike On 02/06/20

[Matplotlib-users] [matplotlib-users] Is it possible to set .pdf as defaut when saving an image?

2012-02-07 Thread Fabien Lafont
Is it possible to set the extension .pdf as defaut when I save an image using the matplotlib bar. My coworkers are always saving the image in png and it's really ugly! Thx, Fab -- Keep Your Developer Skills Current with

[Matplotlib-users] Switch graphs

2012-02-07 Thread phils
Newbie to using matplotlib Is it possible to use wx and have a window with say 2 buttons on where when clicking on either button a different graph will appear using a different data set. Any examples? Regards Phil -- View this message in context: http://old.nabble.com/Switch-graphs-tp33263048p

Re: [Matplotlib-users] How matplotlib got me a job

2012-02-07 Thread Friedrich Romstedt
2012/2/7 John Hunter : > On Mon, Feb 6, 2012 at 1:59 PM, Benjamin Root wrote: >> [...] > > [...] > >> About a week later, I got a personal email from the original poster >> informing me that my solution worked perfectly.  He also noticed that I was >> working in a neighboring building on campus an