Re: [Matplotlib-users] Simple text style question

2010-01-13 Thread Gökhan Sever
On Wed, Jan 13, 2010 at 11:22 AM, Jae-Joon Lee wrote: > On Wed, Jan 13, 2010 at 11:32 AM, Gökhan Sever > wrote: > > I printed the PNG and PS file. The result looks same on paper as well. I > was > > comparing the two ps file one from IDL one from MPL. IDL looks neat both > on > > the screen and

Re: [Matplotlib-users] Simple text style question

2010-01-13 Thread Jae-Joon Lee
On Wed, Jan 13, 2010 at 11:32 AM, Gökhan Sever wrote: > I printed the PNG and PS file. The result looks same on paper as well. I was > comparing the two ps file one from IDL one from MPL. IDL looks neat both on > the screen and printed. > Are you saying that the printout of the mpl-created postsc

Re: [Matplotlib-users] Simple text style question

2010-01-13 Thread Gökhan Sever
On Wed, Jan 13, 2010 at 10:32 AM, Gökhan Sever wrote: > > > On Wed, Jan 13, 2010 at 10:08 AM, Jae-Joon Lee wrote: > >> On Tue, Jan 12, 2010 at 9:56 PM, Gökhan Sever >> wrote: >> > What could be causing this discrepancy? Is there any way to use an >> > alternative PS creator with MPL? or an option

Re: [Matplotlib-users] Simple text style question

2010-01-13 Thread Gökhan Sever
On Wed, Jan 13, 2010 at 10:08 AM, Jae-Joon Lee wrote: > On Tue, Jan 12, 2010 at 9:56 PM, Gökhan Sever > wrote: > > What could be causing this discrepancy? Is there any way to use an > > alternative PS creator with MPL? or an option to increase e.g. bits per > > pixel option somewhere in the conf

Re: [Matplotlib-users] Simple text style question

2010-01-13 Thread Jae-Joon Lee
On Tue, Jan 12, 2010 at 9:56 PM, Gökhan Sever wrote: > What could be causing this discrepancy? Is there any way to use an > alternative PS creator with MPL? or an option to increase e.g. bits per > pixel option somewhere in the configuration? > There can be a lot of things. However, you cannot ju

Re: [Matplotlib-users] Simple text style question

2010-01-12 Thread Gökhan Sever
Allright, I have another comparison. My simple hello.ps file produced by the svn MPL vs test_idl.ps (which has a lot plots --only for test purposes.) file produced by IDL. When I converted the ps file to pdf (using ps2pdf tool) it gets shinier. http://ccnworks.googlecode.com/svn/trunk/hello.ps ht

Re: [Matplotlib-users] Simple text style question

2010-01-12 Thread Gökhan Sever
On Tue, Jan 12, 2010 at 2:46 PM, Jae-Joon Lee wrote: > On Mon, Jan 11, 2010 at 3:20 PM, Gökhan Sever > wrote: > > Another thing I noted in these images, Qt4Agg produced one looks much > > prettier to my eyes than the PS. What could be causing the jiggly > rendering > > in the PS? > > > > The ren

Re: [Matplotlib-users] Simple text style question

2010-01-12 Thread Jae-Joon Lee
On Mon, Jan 11, 2010 at 3:20 PM, Gökhan Sever wrote: > Another thing I noted in these images, Qt4Agg produced one looks much > prettier to my eyes than the PS. What could be causing the jiggly rendering > in the PS? > The rendering quality of the fonts depends on a lot of things. And I think your

Re: [Matplotlib-users] Simple text style question

2010-01-11 Thread Gökhan Sever
OK JJ, After reading your explanation, I have tried my current Qt4Agg and PS backends. As you told coloring worked only with PS backend. See my sample test-snippets. plt.rcParams["text.latex.preamble"] = r"\usepackage{color}" plt.plot(range(10)); plt.ylabel("\color{red} {red}, \color{blue} {blue

Re: [Matplotlib-users] Simple text style question

2010-01-11 Thread Jae-Joon Lee
First of all, to use "\color" with TeX, you need to use "color" package, i.e., you need to modify your latex preamble to include that package. This can be done by import matplotlib.pyplot as plt plt.rcParams["text.latex.preamble"] = r"\usepackage{color}" I guess the error you encounter is because

Re: [Matplotlib-users] Simple text style question

2010-01-11 Thread Gökhan Sever
This seems like the solution. However when I try: I[1]: plt.plot(range(10)) I[2]: plt.ylabel(r"{\color{red} a red text}") It doesn't function and produce an ugly set of error messages: I[3]: ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or in

Re: [Matplotlib-users] Simple text style question

2010-01-11 Thread Jeff Whitaker
Gökhan Sever wrote: > > > On Mon, Jan 11, 2010 at 6:51 AM, Jeff Whitaker > wrote: > > Gökhan Sever wrote: > > Hello, > > Is there a way to color words differently in a label or title, > for example: > > ylabel("measurement 1 (in red co

Re: [Matplotlib-users] Simple text style question

2010-01-11 Thread Jeff Whitaker
Gökhan Sever wrote: > Hello, > > Is there a way to color words differently in a label or title, for > example: > > ylabel("measurement 1 (in red color)" , "measurement 2 (in blue > color)") to match with the plotted line colors? > > Thanks. > > -- > Gökhan Gökhan: ylabel('measurement 1',color='

Re: [Matplotlib-users] Simple text style question

2010-01-11 Thread Damon McDougall
Hi Gökhan, Do you have usetex=True set? If so, have you tried the LaTeX command sequence \color{red}{Red text goes here} ? Regards, -- Damon -- Damon McDougall Mathematics Institute University of Warwick Coventry CV4 7AL d.mcdoug...@warwick.ac.uk On 11 Jan 2010, at 05:4

[Matplotlib-users] Simple text style question

2010-01-10 Thread Gökhan Sever
Hello, Is there a way to color words differently in a label or title, for example: ylabel("measurement 1 (in red color)" , "measurement 2 (in blue color)") to match with the plotted line colors? Thanks. -- Gökhan -- Th