SourceForge logo
SourceForge logo
Menu

matplotlib-devel — matplotlib developers

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
(1)
Nov
(33)
Dec
(20)
2004 Jan
(7)
Feb
(44)
Mar
(51)
Apr
(43)
May
(43)
Jun
(36)
Jul
(61)
Aug
(44)
Sep
(25)
Oct
(82)
Nov
(97)
Dec
(47)
2005 Jan
(77)
Feb
(143)
Mar
(42)
Apr
(31)
May
(93)
Jun
(93)
Jul
(35)
Aug
(78)
Sep
(56)
Oct
(44)
Nov
(72)
Dec
(75)
2006 Jan
(116)
Feb
(99)
Mar
(181)
Apr
(171)
May
(112)
Jun
(86)
Jul
(91)
Aug
(111)
Sep
(77)
Oct
(72)
Nov
(57)
Dec
(51)
2007 Jan
(64)
Feb
(116)
Mar
(70)
Apr
(74)
May
(53)
Jun
(40)
Jul
(519)
Aug
(151)
Sep
(132)
Oct
(74)
Nov
(282)
Dec
(190)
2008 Jan
(141)
Feb
(67)
Mar
(69)
Apr
(96)
May
(227)
Jun
(404)
Jul
(399)
Aug
(96)
Sep
(120)
Oct
(205)
Nov
(126)
Dec
(261)
2009 Jan
(136)
Feb
(136)
Mar
(119)
Apr
(124)
May
(155)
Jun
(98)
Jul
(136)
Aug
(292)
Sep
(174)
Oct
(126)
Nov
(126)
Dec
(79)
2010 Jan
(109)
Feb
(83)
Mar
(139)
Apr
(91)
May
(79)
Jun
(164)
Jul
(184)
Aug
(146)
Sep
(163)
Oct
(128)
Nov
(70)
Dec
(73)
2011 Jan
(235)
Feb
(165)
Mar
(147)
Apr
(86)
May
(74)
Jun
(118)
Jul
(65)
Aug
(75)
Sep
(162)
Oct
(94)
Nov
(48)
Dec
(44)
2012 Jan
(49)
Feb
(40)
Mar
(88)
Apr
(35)
May
(52)
Jun
(69)
Jul
(90)
Aug
(123)
Sep
(112)
Oct
(120)
Nov
(105)
Dec
(116)
2013 Jan
(76)
Feb
(26)
Mar
(78)
Apr
(43)
May
(61)
Jun
(53)
Jul
(147)
Aug
(85)
Sep
(83)
Oct
(122)
Nov
(18)
Dec
(27)
2014 Jan
(58)
Feb
(25)
Mar
(49)
Apr
(17)
May
(29)
Jun
(39)
Jul
(53)
Aug
(52)
Sep
(35)
Oct
(47)
Nov
(110)
Dec
(27)
2015 Jan
(50)
Feb
(93)
Mar
(96)
Apr
(30)
May
(55)
Jun
(83)
Jul
(44)
Aug
(8)
Sep
(5)
Oct
Nov
(1)
Dec
(1)
2016 Jan
Feb
Mar
(1)
Apr
May
Jun
(2)
Jul
Aug
(3)
Sep
(1)
Oct
(3)
Nov
Dec
2017 Jan
Feb
(5)
Mar
Apr
May
Jun
Jul
(3)
Aug
Sep
(7)
Oct
Nov
Dec
2018 Jan
Feb
Mar
Apr
May
Jun
Jul
(2)
Aug
Sep
Oct
Nov
Dec
S M T W T F S


1
(13)
2
(16)
3
(5)
4
(6)
5
(4)
6
7
(8)
8
(4)
9
(8)
10
(14)
11
(20)
12
(3)
13
(7)
14
(1)
15
(1)
16
(5)
17
(9)
18
(5)
19
20
21
(5)
22
(7)
23
(4)
24
25
26
27
(3)
28
(2)
29
(8)
30
(6)



Showing 16 results of 16

From: Benjamin R. <ben...@ou...> - 2010年06月02日 23:21:08
On Wed, Jun 2, 2010 at 10:26 AM, John Hunter <jd...@gm...> wrote:
> On Wed, Jun 2, 2010 at 9:48 AM, Benjamin Root <ben...@ou...> wrote:
> > I am curious as to why bar() should even be acting like errorbar(). As a
> > user, I would expect bar() to do bar graphs and errorbar() to do error
> bar
> > graphs. Is there some sort of use-case that I am missing where it makes
> > sense to generate errorbars from a bar() function?
>
> Some of this stuff is just really old (circa 2003). When you have
> just a few users and someone sends you a patch, you tend to accept it
> :-)
>
> First we had bar, then we had errorbar, and someone wanted the
> convenience of easily adding errorbars to bar plots. Over time, these
> conveniences have grown into a fairly complex interface (xerr, yerr,
> asymmetric errors). So it has grown more organically than by design
> and some rationalization and normalization of functionality would be a
> good thing. We have to balance that with the downsides of code
> breakage, however.
>
> I kinda figured something like that was the case. I am just cautious about
additional "organic" development of these functions. I have encountered
some functions where it was a bug that the function did not pass on the
kwargs, and others where it wasn't a bug. Does the approach of using a
separate dict called error_kw fit in with some sort of overall design/best
practices or might there be a better way to approach this.
I merely ask because I am quite new here and I am curious about what style
we want for our code. Maybe we should consider some sort of special
universal (for matplotlib) module that does special handling of kwargs? I
am just throwing out some thoughts.
Ben Root
From: Eric F. <ef...@ha...> - 2010年06月02日 20:44:13
On 06/01/2010 03:33 PM, Fernando Perez wrote:
> On Tue, Jun 1, 2010 at 4:35 PM, Eric Firing<ef...@ha...> wrote:
>> it seems to me that the solution is for
>> bar to take a kwarg, say "errorkw", which is a dict that will be passed
>> to errorbar via **errorkw, and that can have any valid errorbar kwargs
>> in it. There is some precedent for this sort of thing, and I find it a
>> useful way of keeping kwargs from getting out of control when one is
>> making complicated compound plots.
>
> That would be my suggessted approach as well, I've used it elsewhere.
>
>> If there is no objection, I will do it.
>
> Fabulous, many thanks!
Done in svn 8369. Its usage is illustrated in barchart_demo.py. 
Partially following your lead with subplots, I spelled it error_kw.
Eric
>
> Cheers,
>
> f
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
From: John H. <jd...@gm...> - 2010年06月02日 18:39:12
On Wed, Jun 2, 2010 at 12:34 PM, Tom Holroyd (NIH/NIMH) [E]
<to...@ku...> wrote:
>
>
> John Hunter wrote:
>>
>> https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3
>
> I'm running Fedora 13, and it mostly works but the config output says that
> Tkinter isn't there, but it is. It finds Qt4 OK, but seems to have trouble
> finding tkinter and agg. I just did the yum install for these things, it's
> only with matplotlib that I have a devel version. What is it looking for and
> where do I look to see?
Make sure you have the tk-devel and tcl-devel packages installed.
Also, try editing setup.cfg
 > cp setup.cfg.template setup.cfg
and set
 tkagg = True
to force a tkagg build (rather than an autobuild).
Do a clean rebuild (rm -rf build) and post the results of the
build/compile if you have problems.
JDH
From: Tom H. (NIH/N. [E] <to...@ku...> - 2010年06月02日 18:08:13
John Hunter wrote:
> 
> https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3
I'm running Fedora 13, and it mostly works but the config output says that
Tkinter isn't there, but it is. It finds Qt4 OK, but seems to have trouble
finding tkinter and agg. I just did the yum install for these things, it's
only with matplotlib that I have a devel version. What is it looking for and
where do I look to see?
-- 
Dr. Tom
---
I would dance and be merry,
Life would be a ding-a-derry,
If I only had a brain.
 -- The Scarecrow
From: Eric F. <ef...@ha...> - 2010年06月02日 16:41:26
On 06/01/2010 05:21 PM, Benjamin Root wrote:
> I have finally managed to test against TkAgg, and the faint white lines
> do not appear to occur. So, as far as I can tell (no clue about Macs),
> the GTKCairo, pdf and svg backends have this display bug. Shall I file
> a bug report for this and another for the misaligned title?
Yes. Please include the simplest scripts you can devise that generate 
and illustrate the problems. In the pcolormesh case, this means keeping 
the plot (and the data being plotted) as simple as possible. If the 
problem can be illustrated with only two color regions, for example, 
that is ideal.
Eric
>
> Ben Root
>
> On Tue, Jun 1, 2010 at 1:07 PM, Benjamin Root <ben...@ou...
> <mailto:ben...@ou...>> wrote:
>
> Correction -- the problem with pcolormesh and the faint white lines
> are occurring for pdf and svg files, *not* eps files as I originally
> stated. I am also checking a number of display backends and found
> that the problem occurs for GTKCairo. I am sure it also happens for
> TkAgg, but I can not confirm that right now. I am unable to test
> the Mac backends, though.
>
> On a side note, when testing the backends, I noticed that GTKCairo
> was *slow* for displaying the figures. Also, the GTK backend
> produced misaligned titles. I can start a new thread about the
> misaligned titles, if someone wishes.
>
> Ben Root
>
>
> On Tue, Jun 1, 2010 at 11:05 AM, Benjamin Root <ben...@ou...
> <mailto:ben...@ou...>> wrote:
>
>
>
> On Tue, Jun 1, 2010 at 9:39 AM, Ryan May <rm...@gm...
> <mailto:rm...@gm...>> wrote:
>
> On Mon, May 31, 2010 at 11:28 AM, Benjamin Root
> <ben...@ou... <mailto:ben...@ou...>> wrote:
> > Markus,
> >
> > That is good to know that it has been fixed. As for the
> difference in
> > pcolor and pcolormesh, I think it has to do with the fact
> that pcolormesh is
> > composed of many lines while pcolor is composed of many
> polygons. It is
> > probably more efficient to rasterize polygons than lines.
>
> To be blunt, this makes no sense whatsoever. First,
> pcolormesh and
> pcolor differ in that it pcolor uses a generic
> PolyCollection to draw
> the quads, while pcolormesh uses a quadmesh object, which
> can be more
> efficient at the cost of generality, as it only needs to
> render a set
> of identical quads. Second, if you're talking rasterized
> drawing, in
> the end what gets written to a file is a 2D array of RGBA
> values. It
> doesn't matter what you use to produce the results:
> identical image on
> the screen -> identical array in file. It's possible that
> there are
> slight differences that you can't really see that produce
> different
> arrays, but that won't cause a factor of 8 difference in
> size. My
> guess is that pcolormesh isn't rasterizing properly.
>
> Indeed, you are right that lines aren't drawn. I have looked
> back at the images produced by my test script that I posted to
> this thread and I see where I got confused. The pcolormesh
> result in pdf and eps files have very faint white blocks around
> each quad. At high enough data resolution, the color part of
> the quads look like lines while the white lines look like dots.
> This happens regardless of using rasterized=True or not, and I
> don't think it is visible in png files (although I am testing
> some very high resolution png files to verify).
>
> Ben Root
>
>
>
>
>
> ------------------------------------------------------------------------------
>
>
>
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
From: Jae-Joon L. <lee...@gm...> - 2010年06月02日 16:04:15
On Wed, Jun 2, 2010 at 10:51 AM, Benjamin Root <ben...@ou...> wrote:
> This is from the matplotlib-users list. A user noticed that he can not
> change the background color of a 3d plot with arguments to .savefig(). Is
> this a bug or is it intentional?
>
> Thanks,
> Ben Root
I think it is just that they are implemented differently. The
background of axes3d is not actually a figure background but an axes
patch. If you want, you can make the patch invisible. This will show
the default gray background of the figure. Also, the options like
transparent=True will work.
ax.patch.set_visible(False)
Regards,
-JJ
From: John H. <jd...@gm...> - 2010年06月02日 15:26:58
On Wed, Jun 2, 2010 at 9:48 AM, Benjamin Root <ben...@ou...> wrote:
> I am curious as to why bar() should even be acting like errorbar(). As a
> user, I would expect bar() to do bar graphs and errorbar() to do error bar
> graphs. Is there some sort of use-case that I am missing where it makes
> sense to generate errorbars from a bar() function?
Some of this stuff is just really old (circa 2003). When you have
just a few users and someone sends you a patch, you tend to accept it
:-)
First we had bar, then we had errorbar, and someone wanted the
convenience of easily adding errorbars to bar plots. Over time, these
conveniences have grown into a fairly complex interface (xerr, yerr,
asymmetric errors). So it has grown more organically than by design
and some rationalization and normalization of functionality would be a
good thing. We have to balance that with the downsides of code
breakage, however.
JDH
From: Benjamin R. <ben...@ou...> - 2010年06月02日 14:52:25
This is from the matplotlib-users list. A user noticed that he can not
change the background color of a 3d plot with arguments to .savefig(). Is
this a bug or is it intentional?
Thanks,
Ben Root
---------- Forwarded message ----------
From: Denis Laxalde <dla...@gm...>
Date: Wed, Jun 2, 2010 at 9:42 AM
Subject: Re: [Matplotlib-users] [mplot3d] change axis background color
To: mat...@li...
This is set in axis3d module (class Axis), by _AXINFO.
So far, I haven't found a way to modify colors/transparency but to edit
the latter file. Is this hard-coded or is there a way to modify this a
posteriori ?
Cheers,
 Denis
Le 02-06-2010, Benjamin Root <ben...@ou...> a
écrit :
> Huh, how about that? I never noticed that before. I wonder if that
> is a bug or if it is intentional?
>
> Ben Root
>
> On Tue, Jun 1, 2010 at 5:28 PM, Denis Laxalde
> <dla...@gm...> wrote:
>
>> Hi Ben,
>>
>> Thanks for your answer. Actually, options for savefig seem to only
>> operate on 2D axes whereas I'm trying to change the color of 3D axes
>> (x,y,z) which, by default, have a grid with a gray background. I
>> manage to remove the grid lines but not the background color. (My
>> initial question was not very clear perhaps...)
>>
>> Denis
>>
>>
>> Le mardi 01 juin 2010 =E0 16:57 -0500, Benjamin Root a =E9crit :
>> > Denis,
>> >
>> > There are probably other ways, but the one that I know off the top
>> > of m=
> y
>> > head is done at the savefig() function. If you want to remove the
>> > background entirely, you can specify the keyword argument
>> transparent=3DTrue.
>> > You can change the color using the facecolor keyword argument. You
>> > can specify any color in that argument like you would elsewhere in
>> matplotlib.
>> >
>> > Ben Root
>> >
>> > On Tue, Jun 1, 2010 at 4:42 PM, Denis Laxalde
>> > <dla...@gm...>
>> wrote:
>> >
>> > > Hi,
>> > >
>> > > Is there a way to change (and maybe remove) the background color
>> > > (gra=
> y
>> > > by default) of axis in mplot3d graphics ?
>> > >
>> > > Thanks,
>> > >
>> > > Denis
>> > >
>>
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Benjamin R. <ben...@ou...> - 2010年06月02日 14:49:19
I am curious as to why bar() should even be acting like errorbar(). As a
user, I would expect bar() to do bar graphs and errorbar() to do error bar
graphs. Is there some sort of use-case that I am missing where it makes
sense to generate errorbars from a bar() function?
Ben Root
On Wed, Jun 2, 2010 at 8:06 AM, John Hunter <jd...@gm...> wrote:
> On Wed, Jun 2, 2010 at 8:01 AM, John Hunter <jd...@gm...> wrote:
>
> > While this is certainly a bug that needs to be fixed (and Eric is
> > right that these functions are heavily overworked and hairy), there is
> > a better workaround than the one you tried. From the errorbar
> > docstring:
>
> Ignore me :-) I had a temporary mental failure and see that this
> won't help you since you are calling "bar" and when bar is called with
> the xerr/yerr args the errorbar return values aren't passed back up.
> And my solution wasn't correct anyhow, since the third argument
> returned from errorbar is a *list* of LineCollection instances, not a
> LineCollection instance. Shutting up....
>
> JDH
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
From: John H. <jd...@gm...> - 2010年06月02日 13:45:27
On Wed, Jun 2, 2010 at 8:28 AM, Tony S Yu <ts...@gm...> wrote:
>
> On Jun 1, 2010, at 8:59 AM, João Luís Silva wrote:
>
> Hi,
>
> Pressing tab, the "Windows" key or the right click key (and maybe
> others) on a plot with the GTKAgg or GTK backend causes the following
> traceback:
Thanks Tony, committed to svn r8367
JDH
From: Tony S Yu <ts...@gm...> - 2010年06月02日 13:28:15
On Jun 1, 2010, at 8:59 AM, João Luís Silva wrote:
> Hi,
> 
> Pressing tab, the "Windows" key or the right click key (and maybe 
> others) on a plot with the GTKAgg or GTK backend causes the following 
> traceback:
> 
> Traceback (most recent call last):
[snip]
> File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", 
> line 2079, in key_press
> if event.key in fullscreen_keys:
> TypeError: 'in <string>' requires string as left operand
> 
> This happens because in these cases the key is None. The WXAgg backend 
> doesn't have this bug (I haven't tested qt nor tk backends).
This is similar to an issue I had. I posted a patch for my error, but it was specific to Qt4 and required all keys to be manually added to the class definition. I suggested a more robust solution: returning early in backend_bases when the key is None. That suggestion kind of died after Darren Dale solicited responses from other devs.
If it helps at all, I've attached a very simple patch. The early return at the top of the patch is the important part. The change near the bottom is added because we've already checked for None (i.e. purely cosmetic).
-Tony
Index: lib/matplotlib/backend_bases.py
===================================================================
--- lib/matplotlib/backend_bases.py	(revision 8366)
+++ lib/matplotlib/backend_bases.py	(working copy)
@@ -2062,6 +2062,8 @@
 # self.destroy() # how cruel to have to destroy oneself!
 # return
 
+ if event.key is None:
+ return
 # Load key-mappings from your matplotlibrc file.
 fullscreen_keys = rcParams['keymap.fullscreen']
 home_keys = rcParams['keymap.home']
@@ -2128,8 +2130,7 @@
 ax.set_xscale('log')
 ax.figure.canvas.draw()
 
- elif event.key is not None and \
- (event.key.isdigit() and event.key!='0') or event.key in all:
+ elif (event.key.isdigit() and event.key!='0') or event.key in all:
 # keys in list 'all' enables all axes (default key 'a'),
 # otherwise if key is a number only enable this particular axes
 # if it was the axes, where the event was raised
From: John H. <jd...@gm...> - 2010年06月02日 13:06:54
On Wed, Jun 2, 2010 at 8:01 AM, John Hunter <jd...@gm...> wrote:
> While this is certainly a bug that needs to be fixed (and Eric is
> right that these functions are heavily overworked and hairy), there is
> a better workaround than the one you tried. From the errorbar
> docstring:
Ignore me :-) I had a temporary mental failure and see that this
won't help you since you are calling "bar" and when bar is called with
the xerr/yerr args the errorbar return values aren't passed back up.
 And my solution wasn't correct anyhow, since the third argument
returned from errorbar is a *list* of LineCollection instances, not a
LineCollection instance. Shutting up....
JDH
From: John H. <jd...@gm...> - 2010年06月02日 13:01:32
On Tue, Jun 1, 2010 at 6:17 PM, Fernando Perez <fpe...@gm...> wrote:
> Hi all,
>
> I just spent some time digging through the matplotlib code, and I see
> that the errorbar line width argument isn't passed through to the
> underlying call. In axis.bar, we have this code:
>
>    if xerr is not None or yerr is not None:
>      if orientation == 'vertical':
>        # using list comps rather than arrays to preserve unit info
>        x = [l+0.5*w for l, w in zip(left, width)]
>        y = [b+h for b,h in zip(bottom, height)]
>
>      elif orientation == 'horizontal':
>        # using list comps rather than arrays to preserve unit info
>        x = [l+w for l,w in zip(left, width)]
>        y = [b+0.5*h for b,h in zip(bottom, height)]
>
>      self.errorbar(
>        x, y,
>        yerr=yerr, xerr=xerr,
>        fmt=None, ecolor=ecolor, capsize=capsize)
>
> while errorbar has this signature:
>
>  def errorbar(self, x, y, yerr=None, xerr=None,
>         fmt='-', ecolor=None, elinewidth=None, capsize=3,
>         barsabove=False, lolims=False, uplims=False,
>         xlolims=False, xuplims=False, **kwargs):
>
> For a poster, we wanted thicker errorbars drawn and had to resort to:
>
> plt.rcParams['lines.markeredgewidth'] = 2
> plt.rcParams['lines.linewidth'] = 2
>
> and reverting back to normal width after making the errorbar calls.
> Should I file a ticket about this, or are such fine-tuning tasks
> considered as fair game for rcParams manipulations?
>
> I'm happy to file the ticket, I just don't want to create unnecessary
> noise if the rcparams is meant to be 'the way' to do it.
While this is certainly a bug that needs to be fixed (and Eric is
right that these functions are heavily overworked and hairy), there is
a better workaround than the one you tried. From the errorbar
docstring:
 Return value is a length 3 tuple. The first element is the
 :class:`~matplotlib.lines.Line2D` instance for the *y* symbol
 lines. The second element is a list of error bar cap lines,
 the third element is a list of
 :class:`~matplotlib.collections.LineCollection` instances for
 the horizontal and vertical error ranges.
So you can call the appropriate methods on the return objects. Eg
 ylines, caplines, vlines = ax.errorbar(...)
if you want to set the vertical line thickness, it is a LineCollection
instance so you can call
 vlines.set_linewidth(2.0)
Since it is a Collection instance, you can also vary the vertical
linewidths by passing in a sequuence of linewidths.
Hope this helps,
JDH
From: Benjamin R. <ben...@ou...> - 2010年06月02日 03:22:00
I have finally managed to test against TkAgg, and the faint white lines do
not appear to occur. So, as far as I can tell (no clue about Macs), the
GTKCairo, pdf and svg backends have this display bug. Shall I file a bug
report for this and another for the misaligned title?
Ben Root
On Tue, Jun 1, 2010 at 1:07 PM, Benjamin Root <ben...@ou...> wrote:
> Correction -- the problem with pcolormesh and the faint white lines are
> occurring for pdf and svg files, *not* eps files as I originally stated. I
> am also checking a number of display backends and found that the problem
> occurs for GTKCairo. I am sure it also happens for TkAgg, but I can not
> confirm that right now. I am unable to test the Mac backends, though.
>
> On a side note, when testing the backends, I noticed that GTKCairo was
> *slow* for displaying the figures. Also, the GTK backend produced
> misaligned titles. I can start a new thread about the misaligned titles, if
> someone wishes.
>
> Ben Root
>
>
> On Tue, Jun 1, 2010 at 11:05 AM, Benjamin Root <ben...@ou...> wrote:
>
>>
>>
>> On Tue, Jun 1, 2010 at 9:39 AM, Ryan May <rm...@gm...> wrote:
>>
>>> On Mon, May 31, 2010 at 11:28 AM, Benjamin Root <ben...@ou...> wrote:
>>> > Markus,
>>> >
>>> > That is good to know that it has been fixed. As for the difference in
>>> > pcolor and pcolormesh, I think it has to do with the fact that
>>> pcolormesh is
>>> > composed of many lines while pcolor is composed of many polygons. It
>>> is
>>> > probably more efficient to rasterize polygons than lines.
>>>
>>> To be blunt, this makes no sense whatsoever. First, pcolormesh and
>>> pcolor differ in that it pcolor uses a generic PolyCollection to draw
>>> the quads, while pcolormesh uses a quadmesh object, which can be more
>>> efficient at the cost of generality, as it only needs to render a set
>>> of identical quads. Second, if you're talking rasterized drawing, in
>>> the end what gets written to a file is a 2D array of RGBA values. It
>>> doesn't matter what you use to produce the results: identical image on
>>> the screen -> identical array in file. It's possible that there are
>>> slight differences that you can't really see that produce different
>>> arrays, but that won't cause a factor of 8 difference in size. My
>>> guess is that pcolormesh isn't rasterizing properly.
>>>
>>> Indeed, you are right that lines aren't drawn. I have looked back at the
>> images produced by my test script that I posted to this thread and I see
>> where I got confused. The pcolormesh result in pdf and eps files have very
>> faint white blocks around each quad. At high enough data resolution, the
>> color part of the quads look like lines while the white lines look like
>> dots. This happens regardless of using rasterized=True or not, and I don't
>> think it is visible in png files (although I am testing some very high
>> resolution png files to verify).
>>
>> Ben Root
>>
>
>
From: Fernando P. <fpe...@gm...> - 2010年06月02日 02:04:45
On Tue, Jun 1, 2010 at 4:35 PM, Eric Firing <ef...@ha...> wrote:
> it seems to me that the solution is for
> bar to take a kwarg, say "errorkw", which is a dict that will be passed
> to errorbar via **errorkw, and that can have any valid errorbar kwargs
> in it. There is some precedent for this sort of thing, and I find it a
> useful way of keeping kwargs from getting out of control when one is
> making complicated compound plots.
That would be my suggessted approach as well, I've used it elsewhere.
> If there is no objection, I will do it.
Fabulous, many thanks!
Cheers,
f
From: Benjamin R. <ben...@ou...> - 2010年06月02日 00:31:06
I just took a look at bar() and errorbar(). bar() has linewidth and uses it
properly (I believe), except in the case where one specifies yerr/xerr (it
doesn't pass on kwargs nor does it apply the linewidth parameter).
Then looking at errorbar(), there is a kwarg called 'elinewidth' which
superceeds 'linewidth' if it is set. Yet, I see no other use of
'elinewidth', only 'linewidth' in a dict called lines_kw. I am not sure if
I see the point in having a parameter called 'elinewidth' (unless one wanted
to make a distinction between the width of the bar's lines and the width of
the line for the caps?), but that might be a side-issue.
I am not convinced that adding a dictionary argument to bar() would make
much sense. Why not simply pass the kwargs to errorbar()? That way, if one
wanted to use yerr/xerr, they could also include elinewidth and others if
they wish (or, even better, let linewidth and other parameters go back
through since those represent the user's intention in the first place).
Just my two cents,
Ben Root
On Tue, Jun 1, 2010 at 6:35 PM, Eric Firing <ef...@ha...> wrote:
> On 06/01/2010 01:17 PM, Fernando Perez wrote:
> > Hi all,
> >
> > I just spent some time digging through the matplotlib code, and I see
> > that the errorbar line width argument isn't passed through to the
> > underlying call. In axis.bar, we have this code:
> >
> > if xerr is not None or yerr is not None:
> > if orientation == 'vertical':
> > # using list comps rather than arrays to preserve unit
> info
> > x = [l+0.5*w for l, w in zip(left, width)]
> > y = [b+h for b,h in zip(bottom, height)]
> >
> > elif orientation == 'horizontal':
> > # using list comps rather than arrays to preserve unit
> info
> > x = [l+w for l,w in zip(left, width)]
> > y = [b+0.5*h for b,h in zip(bottom, height)]
> >
> > self.errorbar(
> > x, y,
> > yerr=yerr, xerr=xerr,
> > fmt=None, ecolor=ecolor, capsize=capsize)
> >
> > while errorbar has this signature:
> >
> > def errorbar(self, x, y, yerr=None, xerr=None,
> > fmt='-', ecolor=None, elinewidth=None, capsize=3,
> > barsabove=False, lolims=False, uplims=False,
> > xlolims=False, xuplims=False, **kwargs):
> >
> > For a poster, we wanted thicker errorbars drawn and had to resort to:
> >
> > plt.rcParams['lines.markeredgewidth'] = 2
> > plt.rcParams['lines.linewidth'] = 2
> >
> > and reverting back to normal width after making the errorbar calls.
> > Should I file a ticket about this, or are such fine-tuning tasks
> > considered as fair game for rcParams manipulations?
>
> No, that seems like a terrible kluge--not at all what rcParams is for.
> bar, errorbar, hist could use some major refactoring. In the meantime,
> since bar simply calls errorbar, it seems to me that the solution is for
> bar to take a kwarg, say "errorkw", which is a dict that will be passed
> to errorbar via **errorkw, and that can have any valid errorbar kwargs
> in it. There is some precedent for this sort of thing, and I find it a
> useful way of keeping kwargs from getting out of control when one is
> making complicated compound plots.
>
> If there is no objection, I will do it.
>
> Eric
>
> >
> > I'm happy to file the ticket, I just don't want to create unnecessary
> > noise if the rcparams is meant to be 'the way' to do it.
> >
> > Cheers,
> >
> > f
> >
> >
> ------------------------------------------------------------------------------
> >
> > _______________________________________________
> > Matplotlib-devel mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>

Showing 16 results of 16

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /