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 results of 174

<< < 1 .. 5 6 7 (Page 7 of 7)
From: Stan W. <sta...@nr...> - 2009年09月04日 21:58:20
> From: Andrew Straw [mailto:str...@as...] 
> Sent: Thursday, September 03, 2009 14:26
>
> Hmm, it seems MS disabled Windows 7 RC downloads. So I'm 
> unable to create such a virtual machine.
One alternative is the 90-day trial of Windows 7 Enterprise:
http://technet.microsoft.com/en-us/evalcenter/cc442495.aspx.
Jae-Joon Lee wrote:
> On Fri, Sep 4, 2009 at 4:10 PM, Jae-Joon Lee<lee...@gm...> wrote:
> 
>> Yes, this should be my fault. I didn't expect that importing a
>> texmager would raise an exception. I'll fix it soon.
>>
>> 
>
> I just committed a changeset that I think would fix this (the
> textpath.py imports texmanager only when required). But I couldn't
> test it as I don't have a machine w/o dvipng at this time.
> 
OK, I added a buildslave without dvipng and the latest svn passes.
Thanks Jae-Joon.
Chalk another one up for the buildbot -- even with only 17 tests, we're
catching a lot of interesting things. Still to be resolved is the empty
datetime issue:
https://sourceforge.net/tracker/?func=detail&aid=2850075&group_id=80706&atid=560720
-Andrew
From: Jae-Joon L. <lee...@gm...> - 2009年09月04日 20:36:54
Hi,
I refactored the textpath class as a separate module (textpath.py).
Now, it supports mathtext and also usetex mode.
The example, demo_text_path.py, also is updated (figure attached).
You may use this module to improve the visibility of the text.
Or you may use it to create your own mpl logo :)
What I'm actually planning to do is to implement the "draw_text" and
the "draw_tex" method of the RendererBase using the textpath so that a
new backend may only implement the draw_path and draw_image. The
usetex-mode will be supported in most of the backend (e.g., usetex in
svg). Of course, the quality of the rendered text will not be ideal,
especially for low dpi screen display, and it should be best if
backend-specific draw_text method is eventually implemented.
I must confess that I don't have much clue about the font rendering.
Most of the code in the textpath.py are borrowed from backed_svg.py
and backend_pdf.py, and it is highly likely that there are things
that I didn't get right. So, it would be great if those who knows
better (e.g., the original authors of the svg and pdf backend) review
my code.
The current code does not take care of "dpi", "rotation" and
"baseline", and also not well optimized. My plan is to improve these
as I incorporate textpath into the RendererBase. Any comments or
suggestion will be welcomed.
Regards,
-JJ
On Fri, Sep 4, 2009 at 4:10 PM, Jae-Joon Lee<lee...@gm...> wrote:
> Yes, this should be my fault. I didn't expect that importing a
> texmager would raise an exception. I'll fix it soon.
>
I just committed a changeset that I think would fix this (the
textpath.py imports texmanager only when required). But I couldn't
test it as I don't have a machine w/o dvipng at this time.
Regards,
-JJ
On Fri, Sep 4, 2009 at 4:06 PM, John Hunter<jd...@gm...> wrote:
> On Fri, Sep 4, 2009 at 2:54 PM, Andrew Straw<str...@as...> wrote:
>
>> Should I remove dvipng from the buildslaves to check for this kind of
>> thing in the future, or should I keep it installed so we can test
>> functionality that uses it?
>
> I think we should have at least one build slave with dvipng and one
> w/o. This is a real bug that the buildbot caught since we do not
> require dvipng for a normal mpl install.
>
Yes, this should be my fault. I didn't expect that importing a
texmager would raise an exception. I'll fix it soon.
Regards,
-JJ
> ------------------------------------------------------------------------------
> 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
>
On Fri, Sep 4, 2009 at 2:54 PM, Andrew Straw<str...@as...> wrote:
> Should I remove dvipng from the buildslaves to check for this kind of
> thing in the future, or should I keep it installed so we can test
> functionality that uses it?
I think we should have at least one build slave with dvipng and one
w/o. This is a real bug that the buildbot caught since we do not
require dvipng for a normal mpl install.
mpl...@co... wrote:
> STATUS: Failure
> revision: 7635 ( http://matplotlib.svn.sourceforge.net/matplotlib/?view=rev&rev=7635 )
> 
I just installed dvipng on the test machines, which I think will make
them pass this test next time.
But it looks from the traceback
http://mpl-buildbot.code.astraw.com/builders/Ubuntu%208.04%2C%20Python%202.5%2C%20amd64/builds/78/steps/test/logs/stdio
that the new textpath module is importing texmanager, which will fail if
dvipng is not installed. Will this cause similar breakage on people's
machines if we they don't have dvipng installed?
Should I remove dvipng from the buildslaves to check for this kind of
thing in the future, or should I keep it installed so we can test
functionality that uses it?
It looks like we may be on the hook for some c++ ABI breakage with
Apple's latest OS (Snow Leopard). See the attached email forwarded from
the numpy mailing list.
-Andrew
From: John H. <jd...@gm...> - 2009年09月04日 01:18:32
On Thu, Sep 3, 2009 at 8:05 PM, <jas...@cr...> wrote:
> This is just a friendly ping about the issue in this thread. I'm
> delaying the patch that shifts Sage's graphics to using the new
> matplotlib and spines, and I think resolving this issue would probably
> resolve the remaining big problem (placing axes labels, as mentioned in
> the thread "setting axis label offset from end of spine").
To make sure this doesn't get misplaced, please post it on the bug tracker:
 https://sourceforge.net/tracker/?group_id=80706&atid=560720
and I'll make sure it gets assigned to Andrew :-)
JDH
From: <jas...@cr...> - 2009年09月04日 01:05:49
Andrew Straw wrote:
> 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.
> 
This is just a friendly ping about the issue in this thread. I'm 
delaying the patch that shifts Sage's graphics to using the new 
matplotlib and spines, and I think resolving this issue would probably 
resolve the remaining big problem (placing axes labels, as mentioned in 
the thread "setting axis label offset from end of spine").
Thanks,
Jason
From: Andrew S. <str...@as...> - 2009年09月03日 18:25:54
Andrew Straw wrote:
> I am interested in getting the buildbot infrastructure to build
> automatic nightly binaries for Windows (XP was my thought, but 7 would
> also be good). If you you'd be willing to perform the work to automate
> build and installation from the svn repo on either your own machine or a
> virtual machine running in my linux box (presuming I could get Windows 7
> running in VirtualBox)
Hmm, it seems MS disabled Windows 7 RC downloads. So I'm unable to
create such a virtual machine.
-Andrew
From: Andrew S. <str...@as...> - 2009年09月03日 17:50:34
Stan West wrote:
> Greetings. I had previously succeeded at building matplotlib in Windows XP
> using Visual Studio 2003. (Thanks to Charlie Moad for much guidance!) I'm
> now running Win7RC and want to set up builds in that OS for Python 2.5. I
> read in the messages of May 28 about the release build script at
> trunk/matplotlib/release/win32 in SVN. So, I'm wondering whether to (a) build
> as I did previously, with VS2003 or mingw using trunk/matplotlib/setup.py and
> dependencies in win32_static, or (b) build with mingw using
> trunk/matplotlib/release/win32/Makefile and dependencies installed there.
> What approach is recommended currently?
>
> Regarding (a), I saw Charlie's message of Apr. 10 about an updated
> win32_static.zip file, but requests for
> http://matplotlib.sourceforge.net/win32_static.zip and win32_static_vs.zip
> yield 404s, while win32_static.tar.gz and win32_static_vs.tar.gz date
> internally from 2005 and 2006, respectively. Is the newer archive available?
>
> Regarding (b), would I still install ActiveTCL to \Tcl and the GTK dev package
> to \GTK, as in approach (a)?
> 
Hi Stan,
(This is unfortunately not an answer to your questions.)
I am interested in getting the buildbot infrastructure to build
automatic nightly binaries for Windows (XP was my thought, but 7 would
also be good). If you you'd be willing to perform the work to automate
build and installation from the svn repo on either your own machine or a
virtual machine running in my linux box (presuming I could get Windows 7
running in VirtualBox), you could itch your own scratch as well as help
the MPL community.
The basic idea is that the buildbot triggers a script (or scripts) on
the buildslave machine. In particular, I have written
test/_buildbot_install.py and test/_buildbot_test.py to sequentially
install (to a virtualenv) and test MPL. Right now these are only tested
on Ubuntu, but I wrote them to be cross platform. John Hunter wrote
test/_buildbot_mac_sage.sh to do the same steps on a Mac, but it's very
installation-specific. The buildmaster simply calls these scripts,
failing if the exit code is non-zero.
It is still on my TODO list to build binaries and upload to a server,
but I think this will be pretty trivial once the first part is worked out.
Regardless of whether you can help with the buildbot automation part, if
you take notes about what you did, I'm sure it will help whomever comes
after you in the process.
-Andrew
From: Stan W. <sta...@nr...> - 2009年09月03日 16:56:40
Greetings. I had previously succeeded at building matplotlib in Windows XP
using Visual Studio 2003. (Thanks to Charlie Moad for much guidance!) I'm
now running Win7RC and want to set up builds in that OS for Python 2.5. I
read in the messages of May 28 about the release build script at
trunk/matplotlib/release/win32 in SVN. So, I'm wondering whether to (a) build
as I did previously, with VS2003 or mingw using trunk/matplotlib/setup.py and
dependencies in win32_static, or (b) build with mingw using
trunk/matplotlib/release/win32/Makefile and dependencies installed there.
What approach is recommended currently?
Regarding (a), I saw Charlie's message of Apr. 10 about an updated
win32_static.zip file, but requests for
http://matplotlib.sourceforge.net/win32_static.zip and win32_static_vs.zip
yield 404s, while win32_static.tar.gz and win32_static_vs.tar.gz date
internally from 2005 and 2006, respectively. Is the newer archive available?
Regarding (b), would I still install ActiveTCL to \Tcl and the GTK dev package
to \GTK, as in approach (a)?
From: Michael S. <mcs...@uc...> - 2009年09月02日 14:02:43
Great suggestions. I'll find time to work on them in the near future,
hopefully.
-Mike
On Sat, Aug 29, 2009 at 6:06 PM, Gary Ruben<gr...@bi...> wrote:
> Very nice addition Michael.
>
> I note that the plt.colormap() line must have gotten lost. It's referred to
> but not there.
> I'll add some ideas to John's list:
>
> * Demonstrate the imsave() command.
> * Rather than show 50 lines or so of array data, just show a few lines, but
> demonstrate what img.shape is before and after slicing out the B channel
> with img[:,:,0]
> * It may be worth mentioning explicitly that img[:,:,0] will give you the
> blue channel for an RGB and an RGBA image.
> * Demonstrate the "upper" and "lower" keywords where relevant.
> * Add a pointer to the scipy.ndimage module
> * Extend the examples with RGB and RGBA images.
> * You might like to show how to recarrays and views on the individual colour
> channels. There are examples in the mailing list archives or maybe on the
> scipy website - I can't remember where.
> * If you want to get more advanced, talk about higher bit depth images than
> 8 bits per channel.
> * If you want to get even more advanced, show how to change the UI to probe
> the pixel value (I wish matplotlib did this by default).
>
> Gary R.
>
> John Hunter wrote:
>>
>> On Sat, Aug 29, 2009 at 10:58 AM, Michael Sarahan<mcs...@uc...>
>> wrote:
>>>
>>> Here you go. If you can think of anything else to include, I'll work
>>> on it. I think the next thing I'll add is something on embedding
>>> images in the corners of plots. figimage is the way to do this,
>>> right?
>
>
From: <jas...@cr...> - 2009年09月02日 05:01:28
Attachments: makeroom.py
In the FAQ, there is an entry about adjusting subplot parameters to make 
room for really long tick labels:
http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels
I made the example a little more general and included a utility function 
that takes care of tick labels and other objects on all sides of the 
graph (the example only corrects for overflows on the left). This code 
might be nice to go into the FAQ. I've attached the code. Please use 
it if you think it is good.
Thanks,
Jason
--
Jason Grout
From: Jae-Joon L. <lee...@gm...> - 2009年09月02日 03:54:09
On Tue, Sep 1, 2009 at 6:03 PM, Michael Thompson<mic...@gm...> wrote:
> 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.
I'm not sure if this helps. *Matplotlib* (not the browser) needs to
know the size of the text when it creates plots. And the issue is that
matplotlib does not know, in general, what font the browser will pick
up for rendering.
It seems that people are using @font-face embedding which are
supported by newer version of firefox and safari.
So, one option would be to use @font-face to specify (and provide) the
fonts that are used when the plot is created by matplotlib. The other
option is to embed the texts as paths as done in the svg banckend.
Of course, there always is a font license issue.
-JJ
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 results of 174

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