[Matplotlib-users] twinx problem

2011-10-03 Thread Christopher Brown
.yaxis.get_major_ticks(): tick.label1.set_color('blue') # does not work (tick labels are not red): for tick in ax2.yaxis.get_major_ticks(): tick.label1.set_color('red') pp.show() -- Christopher Brown, Ph.D. Associate Research Professor Department of Speech and Hearing Science Arizona S

Re: [Matplotlib-users] add_axes

2011-08-12 Thread Christopher Brown
Hi Ben, Eric and Paul, Paul's partial solution is actually exactly what I need. Thanks! -Chris On Friday, August 12, 2011 07:26:22 PM Benjamin Root wrote: > On Friday, August 12, 2011, Christopher Brown wrote: > > Thanks Ben, > > > > I should have been more clear. I

Re: [Matplotlib-users] add_axes

2011-08-12 Thread Christopher Brown
be misunderstanding something. -Chris On Friday, August 12, 2011 05:57:17 PM Benjamin Root wrote: > Yes, you are making it harder on yourself... > > On Friday, August 12, 2011, Christopher Brown wrote: > > I feel like I'm doing this right, but it doesn't work.

[Matplotlib-users] add_axes

2011-08-12 Thread Christopher Brown
ost recent call last): File "", line 1, in File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 606, in add_axes assert(a.get_figure() is self) AssertionError -- Christopher Brown, Ph.D. Associate Research Professor Department of Speech and Hearing S

Re: [Matplotlib-users] change background

2011-07-14 Thread Christopher Brown
svg", transparent=True) ''' ax.patch.set_facecolor(color) lh = ax.get_legend() if lh != None: lh.legendPatch.set_facecolor(color) -- Christopher Brown, Ph.D. Associate Research Professor Depa

[Matplotlib-users] annotate

2011-07-14 Thread Christopher Brown
ax2.set_xscale('log') ax1.annotate("", (1,-30), (2000,-30), arrowprops=dict(arrowstyle="-|>",fc="b", ec="b")) ax2.annotate("", (100, 5), (2000, 5), arrowprops=dict(arrowstyle="-|>",fc="

[Matplotlib-users] Title color

2010-05-03 Thread Christopher Brown
Hi List, How can I change the (fore)color of a figure title (pp.title('Wow!')) after it has been added to the figure? I can do this with axes labels like this: pp.gca().axes.xaxis.label.set_color(color) -- Christopher Brown, Ph.D. Associate Research Professor Department of Speech a

Re: [Matplotlib-users] One more time: frame linewidth

2009-08-19 Thread Christopher Brown
> > also, see this example, > > http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html#pylab-examples-spine-placement-demo > > Regards, > > -JJ > > > > On Tue, Aug 18, 2009 at 5:18 PM, Christopher Brown wrote: >> I have asked this question

[Matplotlib-users] One more time: frame linewidth

2009-08-18 Thread Christopher Brown
I have asked this question before. How do I set the linewidth of the axis frame? Long ago, I used gca().get_frame().set_linewidth(2). More recently, I used gca().frame.set_linewidth(2), but this doesn't seem to work anymore. I've tried gca().patch, to no avail. Any suggestions? Thanks. ---

Re: [Matplotlib-users] pyplot.figure stealing window focus!!

2009-04-15 Thread Christopher Brown
ld be more like how Matlab figures behave. Although they popup to the foreground, you can continue typing and focus is correctly applied to the console. -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizo

Re: [Matplotlib-users] offset in dragging a legend

2009-03-25 Thread Christopher Brown
(self.figure.axes[0].bbox.width) -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University -- ___ Matplotlib-users mailing list Matplotlib-users

Re: [Matplotlib-users] How to get the coordinates (picker)

2009-03-23 Thread Christopher Brown
= "X is: " + str(mouseevent.xdata) + "\nY is: " + str(mouseevent.ydata) QMessageBox.information(self, "Click!", msg) I got some good tips on how to do this from examples/event_handling/pick_event_demo.py -- Christopher Bro

Re: [Matplotlib-users] sluggish pdfs with large data sets

2009-03-03 Thread Christopher Brown
t from 3.3 mb to 84 kb. This was an incredibly timely tip too, because I was just about to go to print with my poster, which I did in Scribus, which would hang on the 3-4 mb pdf figure. I was about to go to png, but now I don't have to. Thanks. -- Christopher Brown, Ph.D. Department of

[Matplotlib-users] Check if figure exists

2009-02-26 Thread Christopher Brown
toscale_on(False)) in case the user has zoomed. -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University -- Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco

Re: [Matplotlib-users] setting thickness of axis frame

2009-02-05 Thread Christopher Brown
same scripts were working before, but adding draw() now does the trick. -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University -- Create and Deploy Rich Internet Apps outside the browser

Re: [Matplotlib-users] setting thickness of axis frame

2009-02-04 Thread Christopher Brown
t_markeredgewidth(2) ...and I also can get invert_yaxis() (or xaxis) to work either. I'm on windows, using 0.98.5, ang Qt4Agg backend. I get no warnings or errors. Does anyone have any ideas? -- Christopher Brown, Ph.D. Department of Speech and Heari

Re: [Matplotlib-users] setting thickness of axis frame

2009-02-03 Thread Christopher Brown
Hi Michael, MH> The Axes object has a method for turning on the frame: MH> set_frame_on(). How do I set the thickness of the frame that MH> appears? I use: plt.gca().get_frame().set_linewidth(2) -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State U

Re: [Matplotlib-users] Legend in X coordinates

2008-12-31 Thread Christopher Brown
.x0+bbox.width/2. # center JL> JL> ax.text(x, 0, "test", va="bottom", ha="center", JL> transform=ax.transAxes) plt.draw() JL> - JL> JL> Note that if you want save the figure, you need to save it with a JL> same dpi, or save the f

[Matplotlib-users] Legend in X coordinates

2008-12-30 Thread Christopher Brown
Hi, How can I get the position, in x coordinates/units, of the legend? Specifically, I'd like to get the center of the legend box, because I want to add some text that is centered-aligned with the legend. Thanks. -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Ar

Re: [Matplotlib-users] plt.gca().get_frame().set_linewidth

2008-11-18 Thread Christopher Brown
a JL> axes background. -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona State University - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based appl

[Matplotlib-users] plt.gca().get_frame().set_linewidth

2008-11-18 Thread Christopher Brown
y the get_frame().set_linewidth() command stopped working, and only the ticks are getting updated. In [5]: matplotlib.__version__ Out[5]: '0.98.3' In [6]: os.name Out[6]: 'nt' Any ideas about what I'm doing wrong? -- Christopher Brown, Ph.D. Department of Speech and

Re: [Matplotlib-users] vertical padding in legend

2008-10-04 Thread Christopher Brown
Hi Jae-Joon, JL> I just had a quick look at this problem. And I'm posting a quick JL> solution in case Christoper haven't dig it yet. My figure looks great with these changes. Thank you very much! -- Christopher Brown, Ph.D. Department of Speech and Hearing Science Arizona

[Matplotlib-users] Tick labels and subscripts

2008-05-22 Thread Christopher Brown
Hi Users, What is the best way to add a subscript to a tick label using the default font? -- Chris - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/M

Re: [Matplotlib-users] distance between tick label and xlabel

2008-05-21 Thread Christopher Brown
> This shouldn't happen if the font metrics are correct, since the > label gets the bounding box of the tick labels and adjusts itself > correctly. This behavior is causing a problem for me. I have two figures with different sets of yticklabels (100 vs 1000), and the ylabels are in different

Re: [Matplotlib-users] getting the min and max values of an axis for plotting

2008-05-12 Thread Christopher Brown
Hi Johann, try: a,b = ylim() > I have a function, which I am plotting. I want to add a line positioned > at, say, the mean of the function, so I want to do plot([x,x],[y0,y1]). > In order to get y0, and y1, my brute force trial and error browsing of > the API lead me to : > y0=gca().yaxis.get_m

Re: [Matplotlib-users] axes scale factor not showing

2008-05-09 Thread Christopher Brown
Hi John, JH> or you can manually change this with JH> JH> fig.subplots_adjust(bottom=0.2) Aha! I had been using rc('figure.subplot', bottom=0.2), but I was looking for a better way. Thanks! -- Chris - This SF.net email is

Re: [Matplotlib-users] Type 3 fonts

2008-05-08 Thread Christopher Brown
Hi Jouni, JKS> Try setting the pdf.fonttype parameter in your matplotlibrc file to JKS> 42 and see if the resulting file passes validation. Matplotlib This produces a good-looking pdf. Unfortunately, It'll be a few weeks before I can test it with the online figure check program, since the that

[Matplotlib-users] Type 3 fonts

2008-05-08 Thread Christopher Brown
Hi List, I recently subjected some figures to an online 'quality analysis' done by a journal I am submitting a paper to. The analysis stated that my figures (created with mpl's pdf backend, and using whatever default fonts are used) used type 3 fonts, and that I should use type 1 whenever poss

[Matplotlib-users] errorbar patch

2008-05-06 Thread Christopher Brown
Hi List, I find the attached patch useful. It adds an argument (elinewidth) to the errorbar function which is a linewidth analog to the ecolor argument. It allows you to specify a linewidth for the errorbars, so that it can be different from the plot linewidth. This is useful to me because I

Re: [Matplotlib-users] markeredgewidth and pdf

2008-05-06 Thread Christopher Brown
Hi Mike, Your test pdf shows up properly in Foxit. MD> So --- this would appear to be a bug in Foxit. Perhaps you could MD> submit this problematic PDF to them. I will do so, and I'll also include your description of the problem. -- Chris --

[Matplotlib-users] errorbar plot caps

2008-05-06 Thread Christopher Brown
Hi mpl users, I have noticed that when making a figure using the errorbar function, a cap line will show up over a marker if they happen to fall on top of one another. The line connecting the caps is (properly) hidden under the marker. This behavior only occurs if the overlapping marker was pla

Re: [Matplotlib-users] markeredgewidth and pdf

2008-05-06 Thread Christopher Brown
Hi Michael, MD> I can't be of much help with Windows builds, unfortunately. MD> However, for clarification, is this error from building pycairo or MD> matplotlib? matplotlib *should* be able to bypass pkg-config if it MD> isn't available. The error occurred while building pycairo. MD> > will

Re: [Matplotlib-users] markeredgewidth and pdf

2008-05-05 Thread Christopher Brown
sing the wxagg backend, which yields the same result (markeredgewidth is always 1 when viewing with foxit). I will create a figure tonight from home (kubuntu) using the cairo backend, then examine it tomorrow at work (windows/foxit) and report back. -- Christopher Brown, Ph.D. Department o

Re: [Matplotlib-users] markeredgewidth and pdf

2008-05-03 Thread Christopher Brown
Christopher Brown wrote: > With mpl 0.91.2, the markeredgewidth property does not seem to have an > effect when using the pdf backend (seems to always be 1, regardless of > what I set it to, and it seems to be fine with other backends). Here is > a minimal example: Interestingl

[Matplotlib-users] markeredgewidth and pdf

2008-04-25 Thread Christopher Brown
Hi List, With mpl 0.91.2, the markeredgewidth property does not seem to have an effect when using the pdf backend (seems to always be 1, regardless of what I set it to, and it seems to be fine with other backends). Here is a minimal example: from matplotlib import use #use('pdf') # <- Uncommen

Re: [Matplotlib-users] How to close the figure after show it?

2008-03-20 Thread Christopher Brown
Hi Brook, FG> Can you give me a simple example to show how to set the figure's FG> interactive property to on? I appreciate! >>> import pylab >>> pylab.ion() -- Chris - This SF.net email is sponsored by: Microsoft Defy a

Re: [Matplotlib-users] How to close the figure after show it?

2008-03-20 Thread Christopher Brown
Hi, > Hi Mike,thanks for your reply. I tried f=figure() and pylab.close(f), > but the figure can not be closed automatically. Seems that > time.sleep(3) doesn't be called until I close the figure manually. Maybe try setting the figure's interactive property to on? -- Chris ---