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

Showing 6 results of 6

From: <edi...@gm...> - 2006年06月15日 22:28:39
SGkgYWxsLAoKSXMgaXQgdGhhdCB0aGUgY29kZSBpbiB0aGUgbWF0aHRleHQgbW9kdWxlIGxvb2tz
IHVnbHkgb3IgaXMgaXQganVzdCBtZQpub3QgdW5kZXJzdGFuZGluZyBpdD8KQWxzbywgaWYgYW55
b25lIGhhcyBzb21lIGdvb2Qgb25saW5lIHNvdXJjZXMgYWJvdXQgcGFyc2luZyBldGMuIG9uIHRo
ZQpuZXQsIEkgdndvdWxkIHJlYWx5IGFwcHJlY2lhdGUgaXQuCgpDb25zaWRlcmluZyB0aGUgZm9s
b3dpbmcgY29kZSAocGlja2VkIG9uIHJhbmRvbSwgZnJvbSBtYXRodGV4dC5weSkKCj09PQpkZWYg
bWF0aF9wYXJzZV9zX2Z0MmZvbnQocywgZHBpLCBmb250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hbmtzIGluIGFkdmFuY2UsCkVkaW4K
From: John H. <jdh...@ac...> - 2006年06月15日 21:14:03
>>>>> "Edin" =3D=3D Edin Salkovi=A7 <edi...@gm...> writes:
 Edin> Hi all, Is it that the code in the mathtext module looks
 Edin> ugly or is it just me not understanding it? Also, if anyone
 Edin> has some good online sources about parsing etc. on the net,
 Edin> I vwould realy appreciate it.
It's probably you not understanding it :-) In my opinion, the code is
pretty nice and modular, with a few exceptions, but I'm biased.
Parsers can be a little hard to understand at first. You might start
by trying to understand pyparsing
 http://pyparsing.wikispaces.com
and work through some of the basic examples there. Once you have your
head wrapped around that, it will get easier.
 Edin> Considering the foowing code (picked on random, from
 Edin> mathtext.py)
 Edin> I don't understand, for example, what does the statement:
 Edin> expression.parseString( s )
 Edin> do?
 Edin> "expression" is defined globaly, and is called (that is -
 Edin> its method) only once in the above definition of the
 Edin> function, but I don't understand - what does that particular
 Edin> line do?!?
It's not defined globally, but at module level. There is only one
expression that represents a TeX math expression (at least as far as
mathtext is concerned) so it is right that there is only one of them
at module level. It's like saying "a name is a first name followed by
an optional middle initial followed by a last name". You only need to
define this one, and then you set handlers to handle the different
components.
The expression assigns subexpressions to handlers. The statement
below says that an expression is one or more of a space, font element,
an accent, a symbol, a subscript, etc...
expression =3D OneOrMore(
 space ^ font ^ accent ^ symbol ^ subscript ^ superscript ^ subsupersc=
ript ^ group ^ composite ).setParseAction(handler.expression).setName("e=
xpression")
A subscript, for example, is a symbol group followed by an underscore
followed by a symbol group
subscript << Group( Optional(symgroup) + Literal('_') + symgroup )
and the handler is defined as
subscript =3D Forward().setParseAction(handler.subscript).setName("subscr=
ipt")
which means that the function handler.subscript will be called every
time the pattern is matched. The tokens will be the first symbol
group, the underscore, and the second symbol group. Here is the
implementation of that function
 def subscript(self, s, loc, toks):
 assert(len(toks)=3D=3D1)
 #print 'subsup', toks
 if len(toks[0])=3D=3D2:
 under, next =3D toks[0]
 prev =3D SpaceElement(0)
 else:
 prev, under, next =3D toks[0] =20
 if self.is_overunder(prev):
 prev.neighbors['below'] =3D next
 else:
 prev.neighbors['subscript'] =3D next
 return loc, [prev]
This grabs the tokens and assigns them to the names "prev" and "next".
Every element in the TeX expression is a special case of an Element,
and every Element has a dictionary mapping surrounding elements to
relative locations, either above or below or right or superscript or
subscript. The rest of this function takes the "next" element, and
assigns it either below (eg for \Sum_0円) or subscript (eg for x_0) and
the layout engine will then take this big tree and lay it out. See
for example the "set_origin" function?
 Edin> ------ Regarding the unicode s
upport in mathtext, mathtext
 Edin> currently uses the folowing dictionary for getting the glyph
 Edin> info out of the font files:
 Edin> latex_to_bakoma =3D {
 Edin> r'\oint' : ('cmex10', 45), r'\bigodot' : ('cmex10', 50),
 Edin> r'\bigoplus' : ('cmex10', 55), r'\bigotimes' : ('cmex10',
 Edin> 59), r'\sum' : ('cmex10', 51), r'\prod' : ('cmex10', 24),
 Edin> ...
 Edin> }
 Edin> I managed to build the following dictionary(little more left
 Edin> to be done): tex_to_unicode =3D { r'\S' : u'\u00a7', r'\P' :
 Edin> u'\u00b6', r'\Gamma' : u'\u0393', r'\Delta' : u'\u0394',
 Edin> r'\Theta' : u'\u0398', r'\Lambda' : u'\u039b', r'\Xi' :
 Edin> u'\u039e', r'\Pi' : u'\u03a0', r'\Sigma' : u'\u03a3',
 Edin> unicode_to_tex is straight forward. Am I on the right
 Edin> track? What should I do next?
Yes, this looks like the right approach. Once you have this
dictionary mostly working, you will need to try and make it work with
a set of unicode fonts. So instead of having the tex symbol point to
a file name and glyph index, you will need to parse a set of unicode
fonts to see which unicode symbols they provide and build a mapping
from unicode name -> file, glyph index. Then when you encounter a tex
symbol, you can use your tex_to_unicode dict combined with your
unicode -> filename, glyphindex dict to get the desired glyph.
 Edin> I also noticed that some TeX commands (commands in the sense
 Edin> that they can have arguments enclosed in brackets {}) are
 Edin> defined as only symbols: \sqrt alone, for example, displays
 Edin> just the begining of the square root:=BA, and \sqrt{123}
 Edin> triggers an error.
We don't have support for \sqrt{123} because we would need to do
something a little fancier (draw the horizontal line over 123). This
is doable and would be nice. To implement it, one approach would be
add some basic drawing functionality to the freetype module, eg to
tell freetype to draw a line on it's bitmap. Another approach would
simply be to grab the bitmap to freetype and pass it off to agg and
use the agg renderer to decorate it. This is probably preferable.
But I think this is a lower priority right now.
JDH
From: John H. <jdh...@ac...> - 2006年06月15日 14:03:18
>>>>> "Eric" == Eric Firing <ef...@ha...> writes:
 Eric> Based on a quick look, I think it would be easy to make
 Eric> LineCollection and PolyCollection accept a numerix array in
 Eric> place of [(x,y), (x,y), ...] for each line segment or
 Eric> polygon; specifically, this could replaced by an N x 2
 Eric> array, where the first column would be x and the second
 Eric> would be y. Backwards compatibility could be maintained
 Eric> easily. This would eliminate quite a bit of useless
 Eric> conversion back and forth among lists, tuples, and arrays.
 Eric> As it is, each sequence of sequences is converted to a pair
 Eric> of arrays in backend_bases, and typically it started out as
 Eric> either a 2-D numerix array or a pair of 1-D arrays in the
 Eric> code that is calling the collection constructor.
I think this is a useful enhancement. I would think that representing
each segment as (x,y) where x and y are 1D arrays, might be slightly
more natural than using an Nx2 but others may disagree.
How often does it come up that we want a homogeneous line collection,
ie a bunch of lines segments with the same properties (color,
linewidth...)? The most expensive part of the agg line collection
renderer is probably the multiple calls to render_scanlines, which is
necessary every time we change the linewidth or color. 
If all of the lines in a collection shared the same properties, we
could draw the entire path with a combination of lineto/moveto, and
just stroke and render it once (agg has an upper limit on path length
though, since at some point I added the following to draw_lines
 if ((i%10000)==0) {
 //draw the path in chunks
 _render_lines_path(path, gc);
 path.remove_all();
 path.move_to(thisx, thisy);
 }
Ie I render it every 10000 points. 
Actually, as I type this I realize the case of homogeneous lines (and
polys) can be handled by the backend method "draw_path". One
possibility is for the LineCollection to detect the homogeneous case
len(linewidths)==1 and len(colors)==1 and call out to draw_path
instead of draw_line_collection (the same could be done for a regular
poly collection). Some extra extension code would probably be
necessary to build the path efficiently from numerix arrays, and to
handle the "chunking" problem to avoid extra long paths, but for
certain special cases (scatters and quiver w/o color mapping) it would
probably be a big win. The downside is that not all backend implement
draw_paths, but the Collection front-end could detect this and fall
back on the old approach if draw_paths is not implemented.
JDH
From: Cyril G. <cyr...@fr...> - 2006年06月15日 11:37:10
Hello,
I use matplotlib 0.87.3 on win32 with wxpython.
 From the command line, the numeric package is set correctly : numpy 
(read from matplotlibrc) and all woks fine.
I try to use matplotlib from pyxpcom (the connector between xpcom and 
python in the mozilla world), it seems matplotlib doesn't read 
matplotlibrc since it looks for numeric package which is not installed.
I don't undestand, is there a reason the matplotlibrc file is not read, 
interpreted ?
thanks a lot,
Cyril.
From: Jordan D. <jdawe@u.washington.edu> - 2006年06月15日 00:22:04
Eric Firing wrote:
> Jordan,
>
> I understand what you wrote. I am a bit worried about the amount of 
> complexity it would add to the collection code, however, and it seems 
> like it would be useful only in quite special situations--and in those 
> situations, there may be reasonable alternatives. For example, the ps 
> backend uses nan as a flag or separator to skip drawing a line 
> segment; if all backends did this, then it would provide a more 
> general way to accomplish what you want to do.
>
> I will keep your idea in mind, but I want to start off with a much 
> simpler change.
I would tend to agree that nan entries would be a better idea than what 
I was talking about. I'll think about trying to modify the backend 
codes to support this behaviour, if they don't already.
Jordan
From: Jordan D. <jdawe@u.washington.edu> - 2006年06月15日 00:03:16
I have one suggestion, slightly off-topic, and I'm not sure how useful 
it would be: you might think about making LineCollection accept a 3-D 
numerix array. This came up for me while I was looking at turning the 
quiver arrows into line segments. As I understand it (and as the 
documentation says) LineCollection takes a set of a lines which are 
composed of continuous line segments, like:
segments = ( line0, line1, line2 )
linen = ( (x0,y0), (x1,y1), (x2, y2) )
I'd like an extra level of organization, like so:
linegroups = ( group0, group1, group2)
groupi = ( line0, line1, line2 )
linen = ( (x0,y0), (x1,y1), (x2, y2) )
Where "linegroups" would be the input to LineCollection. I assume it's 
fairly obvious how this turns into a rank 3 array.
The reason for this is that it allows for the drawing of non-continuous 
lines. This came up with the quiver arrow stuff because, as it stands, 
drawing a line-based arrow requires you to back-track over a previous 
line at least once. This created some rendering problems, where the 
back-tracked line was darker than the others, at least on the agg 
backend. This can be fixed by backtracking along every line in the 
arrow, so you are essentially drawing the arrow twice, but that seems 
inefficient. It is possible to draw 3 seperate line segments for each 
arrow, but then the colormapping no longer works; each line segment gets 
a different color, and the arrows look like a mess.
As I said, I don't know how useful this would be; it only comes up when 
drawing non-closed line segments that need to be addressed as a single 
object. Does what I wrote make sense?
Jordan
Eric Firing wrote:
> Based on a quick look, I think it would be easy to make LineCollection 
> and PolyCollection accept a numerix array in place of [(x,y), (x,y), 
> ...] for each line segment or polygon; specifically, this could replaced 
> by an N x 2 array, where the first column would be x and the second 
> would be y. Backwards compatibility could be maintained easily. This 
> would eliminate quite a bit of useless conversion back and forth among 
> lists, tuples, and arrays. As it is, each sequence of sequences is 
> converted to a pair of arrays in backend_bases, and typically it started 
> out as either a 2-D numerix array or a pair of 1-D arrays in the code 
> that is calling the collection constructor.
>
> Using a single 2-D array makes it easier to determine whether one is 
> dealing with 'old-style' inputs or 'new-style' inputs, but it might 
> still be reasonable to allow [X, Y] instead or in addition, where X and 
> Y are 1-D numerix arrays.
>
> Any objections or alternative suggestions?
>
> Eric
>
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 

Showing 6 results of 6

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 によって変換されたページ (->オリジナル) /