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



Showing 8 results of 8

From: Michael T. <mic...@gm...> - 2009年09月01日 22:03:46
2009年9月1日 Jae-Joon Lee <lee...@gm...>:
> My understanding is that all the backends should use left-bottom
> alignment. Text alignment in matplotlib is handled by mpl itself (not
> by the backend), and for this to work, you have to define
> get_text_width_height_descent method correctly.
>
> The real question is how we know the metric of the font that will be
> used for rendering. I have little knowledge about the html canvas
> specification, but I presume that the situation is very similar to the
> svg case. Unless we embed the fonts (the svg backend has an option to
> embed the fonts as paths), I don't think it is possible to get it
> right.
I see firefox 3.5 (html5) has a method to measure the width of the
text, I'll look at using this in a javascript function to render the
text.
 https://developer.mozilla.org/en/Drawing_text_using_a_canvas#measureText%28%29
>
> ps. gnuplot seems to use embedded fonts for their html5 canvas backend
> (I haven't checked carefully but their demo output uses canvastext.js,
> originally from http://jim.studt.net/canvastext/)
yep noticed that, but didn't realize the significance of not using the
built in canvas text drawing.
Thanks, Michael
From: Sebastian P. <spc...@gm...> - 2009年09月01日 20:53:01
mpl 0.99.0 installer from SF doesn't work for me (python2.6). Python
interpreter crashes without any message every time I import
matplotlib._path.pyd or _png.pyd
I have win xp sp3, mingw-tdm(4.4.0)
Previous mpl installer worked fine but mpl 0.99.0 isn't
The only way to have it was to compile mpl 0.99.0 under mingw this way:
1. make import lib from dll: original msvcr90.dll -> msvcr90.dll.a (google
this)
2. temporiarly replace mingw's libmsvcr90.a with msvcr90.dll.a
3. compile mpl as usual
4. restore libmsvcr90.a
-- 
View this message in context: http://www.nabble.com/binary-installers-for-python2.6--libpng-segfault%2C-MSVCR90.DLL-and-%09mingw-tp23971661p25244316.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.
From: Jae-Joon L. <lee...@gm...> - 2009年09月01日 17:58:04
On Tue, Sep 1, 2009 at 12:57 PM, Michael Thompson<mic...@gm...> wrote:
> 2009年9月1日 John Hunter <jd...@gm...>:
>> On Tue, Sep 1, 2009 at 10:32 AM, Michael Thompson<mic...@gm...> wrote:
>>> Hi,
>>> I'm trying to work on the canvas javascript backend I found here
>>> [1]. I'm trying to add text but the canvas origin is at the top left,
>>> how can I transform the co-ordinates from the matplotlib to canvas?
>>>
>>>  def draw_text(self, gc, x, y, s, prop, angle, ismath=False):
>>>    ctx = self.ctx
>>>    ctx.font = "12px Times New Roman";
>>>    ctx.fillStyle = "Black";
>>>    ctx.fillText("%r" % s, x, y)
>>>
>>> [1] http://bitbucket.org/sanxiyn/matplotlib-canvas/src/80e9abf6d251/backend_canvas.py
>>
>> The backend canvas should know its height, so height-y should
>> transform from bottom to top
>
> Thanks, turns out to be a problem setting the size of the canvas
> element that the javascript is rendered into. If self.flipy is set
> then the text.py takes care of subtracting y from the height.
>
> Next problem is the text alignment, look OK on the right axis but
> wrong on the left I presume it's the alignment.
>
> The documentation says that s should be a matplotlib.text.Text
> instance and I can use s.get_horizontalalignment() but it seems that s
> is a unicode string. How can I find the alignment I should set on the
> text?
>
> Michael
>
My understanding is that all the backends should use left-bottom
alignment. Text alignment in matplotlib is handled by mpl itself (not
by the backend), and for this to work, you have to define
get_text_width_height_descent method correctly.
The real question is how we know the metric of the font that will be
used for rendering. I have little knowledge about the html canvas
specification, but I presume that the situation is very similar to the
svg case. Unless we embed the fonts (the svg backend has an option to
embed the fonts as paths), I don't think it is possible to get it
right.
Again, I have little knowledge about html5 canvas thing, and I hope
any expert out ther clarify this issue.
-JJ
ps. gnuplot seems to use embedded fonts for their html5 canvas backend
(I haven't checked carefully but their demo output uses canvastext.js,
originally from http://jim.studt.net/canvastext/)
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
From: Michael T. <mic...@gm...> - 2009年09月01日 16:57:23
2009年9月1日 John Hunter <jd...@gm...>:
> On Tue, Sep 1, 2009 at 10:32 AM, Michael Thompson<mic...@gm...> wrote:
>> Hi,
>> I'm trying to work on the canvas javascript backend I found here
>> [1]. I'm trying to add text but the canvas origin is at the top left,
>> how can I transform the co-ordinates from the matplotlib to canvas?
>>
>>  def draw_text(self, gc, x, y, s, prop, angle, ismath=False):
>>    ctx = self.ctx
>>    ctx.font = "12px Times New Roman";
>>    ctx.fillStyle = "Black";
>>    ctx.fillText("%r" % s, x, y)
>>
>> [1] http://bitbucket.org/sanxiyn/matplotlib-canvas/src/80e9abf6d251/backend_canvas.py
>
> The backend canvas should know its height, so height-y should
> transform from bottom to top
Thanks, turns out to be a problem setting the size of the canvas
element that the javascript is rendered into. If self.flipy is set
then the text.py takes care of subtracting y from the height.
Next problem is the text alignment, look OK on the right axis but
wrong on the left I presume it's the alignment.
The documentation says that s should be a matplotlib.text.Text
instance and I can use s.get_horizontalalignment() but it seems that s
is a unicode string. How can I find the alignment I should set on the
text?
Michael
From: John H. <jd...@gm...> - 2009年09月01日 15:36:35
On Tue, Sep 1, 2009 at 10:32 AM, Michael Thompson<mic...@gm...> wrote:
> Hi,
> I'm trying to work on the canvas javascript backend I found here
> [1]. I'm trying to add text but the canvas origin is at the top left,
> how can I transform the co-ordinates from the matplotlib to canvas?
>
>  def draw_text(self, gc, x, y, s, prop, angle, ismath=False):
>    ctx = self.ctx
>    ctx.font = "12px Times New Roman";
>    ctx.fillStyle = "Black";
>    ctx.fillText("%r" % s, x, y)
>
> [1] http://bitbucket.org/sanxiyn/matplotlib-canvas/src/80e9abf6d251/backend_canvas.py
The backend canvas should know its height, so height-y should
transform from bottom to top
From: Andrew S. <str...@as...> - 2009年09月01日 15:34:10
jas...@cr... wrote:
> Do the right and top spines display correctly when the position is set 
> using 'axes' coordinates?
> 
Jason,
This looks like a bug. I'll look into it. Please ping me in a few days
if you haven't heard back.
-Andrew
From: Michael T. <mic...@gm...> - 2009年09月01日 15:32:33
Hi,
 I'm trying to work on the canvas javascript backend I found here
[1]. I'm trying to add text but the canvas origin is at the top left,
how can I transform the co-ordinates from the matplotlib to canvas?
 def draw_text(self, gc, x, y, s, prop, angle, ismath=False):
 ctx = self.ctx
 ctx.font = "12px Times New Roman";
 ctx.fillStyle = "Black";
 ctx.fillText("%r" % s, x, y)
[1] http://bitbucket.org/sanxiyn/matplotlib-canvas/src/80e9abf6d251/backend_canvas.py
Regards, Michael
From: <jas...@cr...> - 2009年09月01日 14:46:50
Do the right and top spines display correctly when the position is set 
using 'axes' coordinates?
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
x = np.linspace(0,2*np.pi,100)
y = 2*np.sin(x)
ax = fig.add_subplot(1,1,1)
ax.set_title('centered spines')
ax.plot(x,y)
ax.spines['right'].set_position(('axes',0.1))
ax.yaxis.set_ticks_position('right')
ax.spines['top'].set_position(('axes',0.25))
ax.xaxis.set_ticks_position('top')
ax.spines['left'].set_color('none')
ax.spines['bottom'].set_color('none')
fig.savefig('test.png',bbox_inches='tight')
Notice that the top spine is 0.25 in axes coordinates, where 0 in the 
axes coordinates is the *top* of the picture, and positive goes up. I'd 
expect that 0.25 in axes coordinates be 25% from the bottom of the 
picture, or that the coordinates would be reversed for the top spine and 
the top spine would be positioned 25% from the top of the picture. 
Having it jump above the picture was a surprise. I noticed the same 
sort of issue for the right spine, as illustrated above as well.
Of course, it may be that I'm just not understanding something...
Thanks,
Jason
--
Jason Grout

Showing 8 results of 8

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