Re: [Matplotlib-users] matplotlib threadsafe?
Chris Withers wrote: > Eric Firing wrote: >> >>> Out of interest, how does one tell MPL to "start a new figure and >>> forget everything that's gone before"? >> >> You can minimize the amount of package and module-level state >> information by using the oo interface: see examples/agg_oo.py. > > I tried this example, and it generates no output. > Is that to be expected? Chris, It should produce a "test.png"; it is using a non-interactive backend. It works on my machine. Eric > > cheers, > > Chris > - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] location of figure window
Hey All, Is there any way I can control the location that a tk figure window is shown on screen? I can control the size fine with: pylab.figure(figsize=(10,10)) ...but this produces a figure that, while it's the right size, is rendered with the top left of the window in the middle of the screen. If I can get it to be to-left, then it will all be visisble without me having to move it with a mouse ;-). Any ideas? Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib threadsafe?
Eric Firing wrote: > >> Out of interest, how does one tell MPL to "start a new figure and >> forget everything that's gone before"? > > You can minimize the amount of package and module-level state > information by using the oo interface: see examples/agg_oo.py. I tried this example, and it generates no output. Is that to be expected? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] discrepancy between plotted line styles and legend styles?
That worked, thanks. On Wed, Apr 9, 2008 at 5:42 AM, Matthias Michler <[EMAIL PROTECTED]> wrote: > Hello Joseph, > > I'm not sure I understand correctly, but it seems to me that the number of > plotted lines (from errorbar, len(gca().lines) ) is large compared to your 3 > labels. That's why only the lines of the first errorbar are used to build the > legend. > It might to helpful to use the 'label' kwarg of errorbar to properly connect > the errorbar to a label. After that you can build the legend with 'legend()'. > > regards Matthias > > PS: Could you provide a complete example, if my suggestion doesn't help, > please? > > > > On Wednesday 09 April 2008 10:54:23 Joseph Xu wrote: > > Hi: > > > > I'm having a problem where the lines I plot show up in one style (all > > solid, with different colors) while the legend shows them to be a > > different style (all blue, different dashes). I used the following > > code to plot: > > > > labels = [] > > dir_names = {'U' : 'UP', 'D' : 'DOWN', 'L' : 'LEFT', 'R' : 'RIGHT'} > > for dir in lines: > > xa = sorted(lines[dir].keys()) > > ya = [lines[dir][x][0] for x in xa] > > yerr = [] > > for x in xa: > > if lines[dir][x][1] > lines[dir][x][2]: > > # no bound data > > yerr.append([0,0]) > > else: > > yerr.append([lines[dir][x][1] - lines[dir][x][0], > lines[dir][x][2] > > - lines[dir][x][0]]) > > yerra = array(yerr).transpose() > > errorbar(xa, ya, yerr=yerra) > > labels.append(dir_names[dir]) > > > > legend(labels) > > show() > > > > > > Here's the result: > > > > http://i32.tinypic.com/2eat8r8.jpg > > > > What am I doing wrong? > > > > Thanks for the help. > > > > Joseph > > > > - > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Don't miss this year's exciting event. There's still time to save $100. > > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java > >one ___ > > Matplotlib-users mailing list > > Matplotlib-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > - > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] multicolor concatenated text.
Unfortunately, matplotlib doesn't automatically provide anything like the rich text formatting you describe. The best you could do is to manually position the text. Cheers, Mike Olivier De Wolf wrote: > Hi, > > I would like to add a Text that has three colors, "bbb, , > " where is in blue, is in green and in red. > I am able to create three texts but how can I have them position 'side > by side'? > > > Thanks, > > Olivier > > > > - > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > > > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] discrepancy between plotted line styles and legend styles?
Hello Joseph, I'm not sure I understand correctly, but it seems to me that the number of plotted lines (from errorbar, len(gca().lines) ) is large compared to your 3 labels. That's why only the lines of the first errorbar are used to build the legend. It might to helpful to use the 'label' kwarg of errorbar to properly connect the errorbar to a label. After that you can build the legend with 'legend()'. regards Matthias PS: Could you provide a complete example, if my suggestion doesn't help, please? On Wednesday 09 April 2008 10:54:23 Joseph Xu wrote: > Hi: > > I'm having a problem where the lines I plot show up in one style (all > solid, with different colors) while the legend shows them to be a > different style (all blue, different dashes). I used the following > code to plot: > > labels = [] > dir_names = {'U' : 'UP', 'D' : 'DOWN', 'L' : 'LEFT', 'R' : 'RIGHT'} > for dir in lines: > xa = sorted(lines[dir].keys()) > ya = [lines[dir][x][0] for x in xa] > yerr = [] > for x in xa: > if lines[dir][x][1] > lines[dir][x][2]: > # no bound data > yerr.append([0,0]) > else: > yerr.append([lines[dir][x][1] - lines[dir][x][0], > lines[dir][x][2] > - lines[dir][x][0]]) > yerra = array(yerr).transpose() > errorbar(xa, ya, yerr=yerra) > labels.append(dir_names[dir]) > > legend(labels) > show() > > > Here's the result: > > http://i32.tinypic.com/2eat8r8.jpg > > What am I doing wrong? > > Thanks for the help. > > Joseph > > - > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java >one ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] discrepancy between plotted line styles and legend styles?
Hi: I'm having a problem where the lines I plot show up in one style (all solid, with different colors) while the legend shows them to be a different style (all blue, different dashes). I used the following code to plot: labels = [] dir_names = {'U' : 'UP', 'D' : 'DOWN', 'L' : 'LEFT', 'R' : 'RIGHT'} for dir in lines: xa = sorted(lines[dir].keys()) ya = [lines[dir][x][0] for x in xa] yerr = [] for x in xa: if lines[dir][x][1] > lines[dir][x][2]: # no bound data yerr.append([0,0]) else: yerr.append([lines[dir][x][1] - lines[dir][x][0], lines[dir][x][2] - lines[dir][x][0]]) yerra = array(yerr).transpose() errorbar(xa, ya, yerr=yerra) labels.append(dir_names[dir]) legend(labels) show() Here's the result: http://i32.tinypic.com/2eat8r8.jpg What am I doing wrong? Thanks for the help. Joseph - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] multicolor concatenated text.
Hi, I would like to add a Text that has three colors, "bbb, , " where is in blue, is in green and in red. I am able to create three texts but how can I have them position 'side by side'? Thanks, Olivier - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users