SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S


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



Showing results of 480

<< < 1 .. 6 7 8 9 10 .. 20 > >> (Page 8 of 20)
From: Pierre GM <pgm...@gm...> - 2009年09月22日 18:54:03
On Sep 19, 2009, at 12:55 PM, Pierre GM wrote:
> All,
> I'm trying to use the Cocoa backend on Snow Leopard, using r7791 
> (GCC 4.2.1 / Python 2.6.1 from Apple, 64b)
> Unfortunately, a simple `plot(range(10),range(10))` gives me an 
> empty window and error message as such:
>
> Python[53010:d07] Inconsistent set of values to create 
> NSBitmapImageRep
> /Users/pierregm/.local/lib/python2.6/site-packages/matplotlib/ 
> backends/backend_cocoaagg.py:140: UninitializedDeallocWarning: 
> leaking an uninitialized object of type NSBitmapImageRep
> 32) # bits per pixel
>
> Can anybody reproduce it ? Would anybody have some ideas on how to 
> fix that ?
> Thx a lot in advance.
> P.
> FYI, the build log can be accessed at: http://pastebin.com/d5b3c1838
I'm very, very sorry to bump my own thread, but I'm in a bit of a 
pickle. Matplotlib installs and runs nicely on my Snow Leopard 
installation, but I'm "blind": cocoa fails, wxpython is 32b only and 
compiling Qt4 is becoming increasingly frustrating on a 64b machine.
Any help or hint would be really, really appreciated.
(and once again, sorry for my being rude)
P.
From: Eric F. <ef...@ha...> - 2009年09月22日 18:33:50
John [H2O] wrote:
> Hello,
> 
> I'm trying to plot text objects with the color used in m.scatter. My goal is
> to individually label each scatter object. I've tried the following:
> 
> circles=m.scatter(cx,cy,zsize,zlevel,cmap=cmap)
> 
> and then:
> CC = circles.get_facecolor()
> i=0
> for x,y in map(cx,cy):
> ax.text(x,y,'some text', color=CC[i])
> 
> But if fails because:
> 
> m.scatter returns:
> <matplotlib.collections.CircleCollection object at 0x127898d0>
> 
> Rather than a list of objects??? Or something. The point is, I would expect
> 'circles' above to have len==cx, but it does not. What am I doing wrong?
The first thing you are doing wrong is failing to provide a complete, 
minimal, self-contained example illustrating the problem. I don't think 
the snippet you gave is representative of what you are running. Instead 
of "map" I think you mean "zip". Where are you incrementing "i"?
The general approach of using the get_facecolor() method to get the 
array, and indexing into it, is fine. That is not where the problem is. 
 Once you put together a minimal example, I think you will find the 
problem--or that there really is no problem.
A collection is used by scatter because it is much more efficient than a 
sequence of objects.
Eric
> 
> 
> 
From: <PH...@Ge...> - 2009年09月22日 18:02:08
John,
The following code works for me (Python 2.5.4, Matplotlib 0.99):
# create and format the colorbar
cbar = pl.colorbar(G, ticks=range(g1,g2+1)) 
cbar.ax.set_ylabel('Gradient (%)', fontsize=10)
cl = pl.getp(cbar.ax, 'ymajorticklabels')
pl.setp(cl, fontsize=10)
-Paul M. Hobson 
> -----Original Message-----
> From: John [H2O] [mailto:was...@gm...]
> Sent: Tuesday, September 22, 2009 8:03 AM
> To: mat...@li...
> Subject: [Matplotlib-users] colorbar tick label fontproperties
> 
> 
> Could someone please explain how to change the font properties for a
> colorbar
> tick label, the following causes no error, but it does NOT work:
> 
> ## CREATE COLORBAR
> ## make a copy of the image object
> im2 = copy.copy(im)
> im2.set_cmap(colmap)
> ## create new axis for colorbar.
> cax = plt.axes([l+w+0.03, b, 0.025, h-0.035])
> cb = plt.colorbar(im2, cax)#, format='%3.2g') # draw colorbar
> ## set colorbar label and ticks
> p_cax = mpl.font_manager.FontProperties(size='6')
> clabels = clevs[::10] ##clevs, by 10 steps
> clabels.append(clevs[-1]) ## add the last label
> cb.ax.set_yticks(np.linspace(0,1,len(clabels)))
> cb.ax.set_yticklabels(['%3.2g' % cl for cl in clabels],
> fontproperties=p_cax)
> cax.set_title('sensitivity\n(%s)' % units,
> fontproperties=p_cax)
> 
> 
> NOTE: It does set the title properties correctly.
> --
> View this message in context: http://www.nabble.com/colorbar-tick-
> label-fontproperties-tp25530779p25530779.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
> 
> 
> ----------------------------------------------------------------------
> --------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market and
> stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: John [H2O] <was...@gm...> - 2009年09月22日 16:18:14
Hello,
I'm trying to plot text objects with the color used in m.scatter. My goal is
to individually label each scatter object. I've tried the following:
circles=m.scatter(cx,cy,zsize,zlevel,cmap=cmap)
and then:
CC = circles.get_facecolor()
i=0
for x,y in map(cx,cy):
 ax.text(x,y,'some text', color=CC[i])
But if fails because:
m.scatter returns:
<matplotlib.collections.CircleCollection object at 0x127898d0>
Rather than a list of objects??? Or something. The point is, I would expect
'circles' above to have len==cx, but it does not. What am I doing wrong?
-- 
View this message in context: http://www.nabble.com/circle-collection-get_facecolors-in-Basemap-tp25530811p25530811.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Ryan M. <rm...@gm...> - 2009年09月22日 16:02:54
On Tue, Sep 22, 2009 at 10:25 AM, Alan <ala...@gm...> wrote:
> Hi there,
>
> I want to move to numpy only. What would be the replacement for:
>
> from matplotlib.numerix.mlab import amax
>
> ?
>
numpy.amax
You should be able to do that for most of numerix I believe (I and would
definitely try that first).
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Alan <ala...@gm...> - 2009年09月22日 15:33:15
Hi there,
I want to move to numpy only. What would be the replacement for:
from matplotlib.numerix.mlab import amax
?
Many thanks in advance,
Alan
From: John [H2O] <was...@gm...> - 2009年09月22日 15:03:06
Could someone please explain how to change the font properties for a colorbar
tick label, the following causes no error, but it does NOT work:
 ## CREATE COLORBAR 
 ## make a copy of the image object
 im2 = copy.copy(im)
 im2.set_cmap(colmap)
 ## create new axis for colorbar.
 cax = plt.axes([l+w+0.03, b, 0.025, h-0.035])
 cb = plt.colorbar(im2, cax)#, format='%3.2g') # draw colorbar
 ## set colorbar label and ticks
 p_cax = mpl.font_manager.FontProperties(size='6')
 clabels = clevs[::10] ##clevs, by 10 steps
 clabels.append(clevs[-1]) ## add the last label
 cb.ax.set_yticks(np.linspace(0,1,len(clabels)))
 cb.ax.set_yticklabels(['%3.2g' % cl for cl in clabels],
 fontproperties=p_cax)
 cax.set_title('sensitivity\n(%s)' % units,
 fontproperties=p_cax)
NOTE: It does set the title properties correctly.
-- 
View this message in context: http://www.nabble.com/colorbar-tick-label-fontproperties-tp25530779p25530779.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Ryan M. <rm...@gm...> - 2009年09月22日 14:43:23
On Tue, Sep 22, 2009 at 9:22 AM, Alan <ala...@gm...> wrote:
> Hi there,
>
> In mtpl __version__ = '0.98.5.3' "from matplotlib._cm import LUTSIZE"
> still works, but in matplotlib.__version__ = '0.99.0' no:
>
> from matplotlib._cm import LUTSIZE
> ImportError: cannot import name LUTSIZE
>
> How can I replace/solve this issue?
>
> Many thanks in advance.
>
from matplotlib.cm import LUTSIZE
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Alan <ala...@gm...> - 2009年09月22日 14:23:02
Hi there,
In mtpl __version__ = '0.98.5.3' "from matplotlib._cm import LUTSIZE"
still works, but in matplotlib.__version__ = '0.99.0' no:
from matplotlib._cm import LUTSIZE
ImportError: cannot import name LUTSIZE
How can I replace/solve this issue?
Many thanks in advance.
Alan
From: John H. <jd...@gm...> - 2009年09月22日 14:17:39
The 0.99.1 release is available for download from sourceforge
 http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/
This is a bug-fix release with an emphasis on stability. Lots of bugs
have been fixed since 0.99.0 so thanks to all who contributed bug
reports, patches and fixes. A detailed listing of fixes is available
in the svn log below
Thanks to Christoph Gohlke for the windows builds.
------------------------------------------------------------------------
r7813 | jdh2358 | 2009年09月21日 12:12:47 -0500 (2009年9月21日) | 1 line
tag for 0.99.1 release
------------------------------------------------------------------------
r7808 | ryanmay | 2009年09月21日 11:30:11 -0500 (2009年9月21日) | 1 line
Correct typo of subtitle() -> suptitle().
------------------------------------------------------------------------
r7803 | mdboom | 2009年09月21日 06:57:17 -0500 (2009年9月21日) | 1 line
Fix 'variable used before defined' errors in backend_pdf.py building the docs
------------------------------------------------------------------------
r7800 | jouni | 2009年09月20日 14:47:46 -0500 (2009年9月20日) | 1 line
Fix usetex spacing errors in pdf backend.
------------------------------------------------------------------------
r7796 | jouni | 2009年09月20日 08:19:25 -0500 (2009年9月20日) | 1 line
Fix off-by-one error in dviread.Tfm
------------------------------------------------------------------------
r7794 | jouni | 2009年09月20日 07:30:22 -0500 (2009年9月20日) | 1 line
Prevent exception in case of missing height and depth information in a TeX font
------------------------------------------------------------------------
r7792 | efiring | 2009年09月19日 18:46:06 -0500 (2009年9月19日) | 2 lines
Fix bug in bar affecting autoscaling with log axis
------------------------------------------------------------------------
r7790 | efiring | 2009年09月19日 01:28:43 -0500 (2009年9月19日) | 2 lines
Fix bug in mlab.demean, with axis = -1
------------------------------------------------------------------------
r7788 | efiring | 2009年09月18日 21:53:06 -0500 (2009年9月18日) | 2 lines
Fix bug in maxdict when replacing an existing item
------------------------------------------------------------------------
r7784 | mdboom | 2009年09月18日 10:16:20 -0500 (2009年9月18日) | 2 lines
Fix bug where subslicing was cutting polar lines off (because it was
treating them as if they were rectilinearly plotted).
------------------------------------------------------------------------
r7780 | efiring | 2009年09月17日 21:48:03 -0500 (2009年9月17日) | 2 lines
Fix garbled getp output
------------------------------------------------------------------------
r7778 | leejjoon | 2009年09月17日 16:42:03 -0500 (2009年9月17日) | 1 line
fix the legend bug that dash-style for LineCollections handle is set incorrectly
------------------------------------------------------------------------
r7776 | jdh2358 | 2009年09月17日 12:06:02 -0500 (2009年9月17日) | 1 line
add make.osx to manifest
------------------------------------------------------------------------
r7774 | mdboom | 2009年09月17日 09:56:00 -0500 (2009年9月17日) | 2 lines
Fix bug whereby non-finite values in the path were not being ignored
by the view limits finding algorithm.
------------------------------------------------------------------------
r7772 | mdboom | 2009年09月17日 09:17:48 -0500 (2009年9月17日) | 2 lines
Fix clip path in SVG backend.
------------------------------------------------------------------------
r7770 | efiring | 2009年09月16日 18:38:54 -0500 (2009年9月16日) | 2 lines
Don't use wxversion with py2exe; fix by Werner Bruhin
------------------------------------------------------------------------
r7762 | jouni | 2009年09月15日 07:12:19 -0500 (2009年9月15日) | 1 line
Don't fail on AFM files containing floating-point bounding boxes
------------------------------------------------------------------------
r7756 | mdboom | 2009年09月14日 12:11:06 -0500 (2009年9月14日) | 1 line
Minor doc fixes
------------------------------------------------------------------------
r7751 | jdh2358 | 2009年09月12日 16:11:42 -0500 (2009年9月12日) | 1 line
tagging for 99.1 release candiate
------------------------------------------------------------------------
r7749 | efiring | 2009年09月11日 16:14:15 -0500 (2009年9月11日) | 2 lines
Backported quiver bug fix from trunk
------------------------------------------------------------------------
r7745 | efiring | 2009年09月11日 15:48:10 -0500 (2009年9月11日) | 2 lines
Fix bug in quiver angle kwarg, found when input angle array is not 1-D
------------------------------------------------------------------------
r7741 | jdh2358 | 2009年09月10日 21:06:30 -0500 (2009年9月10日) | 1 line
minor tweaks to licensing devel doc
------------------------------------------------------------------------
r7740 | astraw | 2009年09月10日 20:54:27 -0500 (2009年9月10日) | 2 lines
bugfix: bounds checking in hexbin with extent specified (SF#2856228)
------------------------------------------------------------------------
r7734 | leejjoon | 2009年09月10日 18:01:28 -0500 (2009年9月10日) | 1 line
fix a bug in Line2D.draw method that produces invalid svg when the
line is invisible
------------------------------------------------------------------------
r7728 | mdboom | 2009年09月09日 14:55:52 -0500 (2009年9月09日) | 2 lines
Fix some documentation warnings.
------------------------------------------------------------------------
r7727 | ryanmay | 2009年09月09日 13:41:43 -0500 (2009年9月09日) | 1 line
Include 'top' keyword argument in docstring for Figure.subplots_adjust().
------------------------------------------------------------------------
r7703 | leejjoon | 2009年09月07日 17:29:04 -0500 (2009年9月07日) | 1 line
fix a bug in lib/matplotlib/bezier.py
------------------------------------------------------------------------
r7638 | astraw | 2009年09月05日 18:20:45 -0500 (2009年9月05日) | 4 lines
spines: fix 'axes' position bug (closes SF#2852168)
Thanks to Jason Grout for reporting this.
------------------------------------------------------------------------
r7633 | leejjoon | 2009年09月03日 22:35:25 -0500 (2009年9月03日) | 1 line
fix a bug in axes_grid.inset_locator.inset_axes
------------------------------------------------------------------------
r7618 | ryanmay | 2009年08月31日 12:34:50 -0500 (2009年8月31日) | 1 line
Use atleast_1d instead of asanyarray. This allows passing in scalars
to quiver/barbs.
------------------------------------------------------------------------
r7617 | ryanmay | 2009年08月31日 12:29:41 -0500 (2009年8月31日) | 1 line
Pull _parse_args out of Quiver and Barbs classes, as we have multiple,
diverging copies of the same code. Now the shared code will actually
be shared.
------------------------------------------------------------------------
r7616 | ryanmay | 2009年08月31日 12:27:12 -0500 (2009年8月31日) | 1 line
Update barb_demo.py with an example using masked arrays.
------------------------------------------------------------------------
r7607 | leejjoon | 2009年08月30日 19:32:12 -0500 (2009年8月30日) | 1 line
fix sf bug #2839919
------------------------------------------------------------------------
r7600 | jdh2358 | 2009年08月30日 11:22:38 -0500 (2009年8月30日) | 1 line
some unit cleanup; fix sf bug 2846058
------------------------------------------------------------------------
r7598 | jdh2358 | 2009年08月30日 08:35:12 -0500 (2009年8月30日) | 1 line
applied Gael's ginput patch
------------------------------------------------------------------------
r7589 | jdh2358 | 2009年08月29日 22:40:08 -0500 (2009年8月29日) | 1 line
added minor kwarg to get_?ticklines and applied ginpu patch
------------------------------------------------------------------------
r7584 | efiring | 2009年08月29日 12:48:37 -0500 (2009年8月29日) | 2 lines
Semilogx, semilogy ensure one axis is linear; patch by Tony Yu
------------------------------------------------------------------------
r7583 | jdh2358 | 2009年08月29日 11:46:44 -0500 (2009年8月29日) | 1 line
minor tweaks to the image tut
------------------------------------------------------------------------
r7582 | jdh2358 | 2009年08月29日 11:35:35 -0500 (2009年8月29日) | 1 line
added Michael Sarahan's image tutorial from the scipy mpl sprint
------------------------------------------------------------------------
r7569 | mdboom | 2009年08月25日 15:04:34 -0500 (2009年8月25日) | 2 lines
Fix cohere_pairs docstring so it builds with new versions of Sphinx
------------------------------------------------------------------------
r7567 | mdboom | 2009年08月25日 10:31:10 -0500 (2009年8月25日) | 2 lines
Support Line2D objects without associated Axes objects.
------------------------------------------------------------------------
r7541 | jdh2358 | 2009年08月23日 13:42:37 -0500 (2009年8月23日) | 1 line
more harness around locale
------------------------------------------------------------------------
r7536 | jdh2358 | 2009年08月23日 00:27:40 -0500 (2009年8月23日) | 1 line
fix some typos in the docs
------------------------------------------------------------------------
r7533 | jdh2358 | 2009年08月22日 21:27:44 -0500 (2009年8月22日) | 1 line
tweaks to os x
------------------------------------------------------------------------
r7530 | jdh2358 | 2009年08月22日 21:10:59 -0500 (2009年8月22日) | 1 line
removed darwin lookup in setupext -- use make.osx install
------------------------------------------------------------------------
r7529 | jdh2358 | 2009年08月22日 21:10:46 -0500 (2009年8月22日) | 1 line
removed darwin lookup in setupext -- use make.osx install
------------------------------------------------------------------------
r7528 | jdh2358 | 2009年08月22日 20:50:21 -0500 (2009年8月22日) | 1 line
added new makefile for osx builds
------------------------------------------------------------------------
r7523 | jdh2358 | 2009年08月22日 18:20:30 -0500 (2009年8月22日) | 1 line
fix osx epd formatting bug in rest
------------------------------------------------------------------------
r7522 | jdh2358 | 2009年08月22日 18:19:44 -0500 (2009年8月22日) | 1 line
applied Ariel's mlab.cohere_pairs fixes
------------------------------------------------------------------------
r7521 | jdh2358 | 2009年08月22日 17:50:55 -0500 (2009年8月22日) | 1 line
added Ariel's max install patch
------------------------------------------------------------------------
r7519 | jouni | 2009年08月22日 01:25:07 -0500 (2009年8月22日) | 2 lines
Fix typos found by Marc Desmarais and Nicolas Pinto
------------------------------------------------------------------------
r7517 | jdh2358 | 2009年08月21日 19:02:15 -0500 (2009年8月21日) | 1 line
fixed a fifo bug for the new transforms infrastructure
------------------------------------------------------------------------
r7506 | ryanmay | 2009年08月19日 02:56:33 -0500 (2009年8月19日) | 1 line
Remove calls to np.asarray(). This was breaking the use of masked
arrays in calls to set_[x|y]data() and is handled appropriately
already by set_data().
------------------------------------------------------------------------
r7502 | mdboom | 2009年08月18日 09:08:27 -0500 (2009年8月18日) | 2 lines
Fix some minor typos in the paths tutorial
------------------------------------------------------------------------
r7501 | mdboom | 2009年08月18日 09:01:41 -0500 (2009年8月18日) | 2 lines
Fix some minor typos in the transforms tutorial
------------------------------------------------------------------------
r7500 | mdboom | 2009年08月18日 09:00:28 -0500 (2009年8月18日) | 2 lines
Fix some minor typos in the transforms tutorial
------------------------------------------------------------------------
r7499 | jdh2358 | 2009年08月18日 00:15:21 -0500 (2009年8月18日) | 1 line
added looking glass demo
------------------------------------------------------------------------
r7498 | jdh2358 | 2009年08月17日 22:48:21 -0500 (2009年8月17日) | 1 line
added path tut
------------------------------------------------------------------------
r7490 | jdh2358 | 2009年08月15日 12:56:44 -0500 (2009年8月15日) | 1 line
added transformations tut, did some reorg
------------------------------------------------------------------------
r7489 | jdh2358 | 2009年08月15日 12:40:27 -0500 (2009年8月15日) | 1 line
some doc reorg
------------------------------------------------------------------------
r7486 | mdboom | 2009年08月14日 08:30:32 -0500 (2009年8月14日) | 2 lines
Fix documentation about Axis.transAxis (thanks Jason Sage)
------------------------------------------------------------------------
r7484 | efiring | 2009年08月13日 20:58:44 -0500 (2009年8月13日) | 3 lines
Prevent exception when image is off screen and out of the axes.
Bug reported by G. Jones.
------------------------------------------------------------------------
r7482 | efiring | 2009年08月13日 19:24:40 -0500 (2009年8月13日) | 2 lines
Remove older versions of some functions in mlab.py; closes bug 2806535
------------------------------------------------------------------------
r7480 | jdh2358 | 2009年08月12日 19:41:58 -0500 (2009年8月12日) | 1 line
add the pngs referenced by sphinx css; closes sf bug 2834121
------------------------------------------------------------------------
r7477 | efiring | 2009年08月12日 11:53:41 -0500 (2009年8月12日) | 2 lines
Typo in navigation_toolbar.rst.
------------------------------------------------------------------------
r7476 | jdh2358 | 2009年08月12日 06:37:13 -0500 (2009年8月12日) | 1 line
do case insensitive color string matching, as suggested in sf bug 2834598
------------------------------------------------------------------------
r7475 | jdh2358 | 2009年08月11日 19:26:50 -0500 (2009年8月11日) | 1 line
update the contributing faq
------------------------------------------------------------------------
r7446 | heeres | 2009年08月11日 02:06:15 -0500 (2009年8月11日) | 2 lines
Fix bugs: #2830483 (axis scaling), 2834105 (z order problem)
------------------------------------------------------------------------
r7444 | efiring | 2009年08月09日 19:31:30 -0500 (2009年8月09日) | 3 lines
Sage patch, slightly modified, to improve tk/tcl detection.
http://trac.sagemath.org/sage_trac/ticket/4176
------------------------------------------------------------------------
r7443 | efiring | 2009年08月09日 19:19:19 -0500 (2009年8月09日) | 3 lines
Patch from Jason, sage project: prevent failure with tiny arrows.
Also deleting unwanted whitespace in bezier.py.
------------------------------------------------------------------------
r7442 | efiring | 2009年08月09日 19:02:56 -0500 (2009年8月09日) | 2 lines
patch from sage project: make unicode_safe safer
------------------------------------------------------------------------
r7433 | efiring | 2009年08月08日 13:16:01 -0500 (2009年8月08日) | 2 lines
Fix excessive line length in annotations.rst
------------------------------------------------------------------------
r7432 | jdh2358 | 2009年08月08日 10:16:57 -0500 (2009年8月08日) | 1 line
simplify poly array in example
------------------------------------------------------------------------
r7431 | jdh2358 | 2009年08月08日 10:10:08 -0500 (2009年8月08日) | 1 line
use a class helper method to make the compound path from polys
------------------------------------------------------------------------
r7430 | jdh2358 | 2009年08月08日 08:58:52 -0500 (2009年8月08日) | 1 line
two new examples using a compund path for a histogram; one animated
------------------------------------------------------------------------
r7429 | jdh2358 | 2009年08月08日 08:53:24 -0500 (2009年8月08日) | 1 line
two new examples using a compund path for a histogram; one animated
------------------------------------------------------------------------
r7428 | jdh2358 | 2009年08月08日 07:21:29 -0500 (2009年8月08日) | 1 line
clean up mplot3d examples: use pyplot noy pylab and numpy rather than
list comps and python random module
------------------------------------------------------------------------
r7426 | jdh2358 | 2009年08月08日 06:00:41 -0500 (2009年8月08日) | 1 line
replace list comps w/ numpy in mplot3d
------------------------------------------------------------------------
r7424 | efiring | 2009年08月08日 01:07:06 -0500 (2009年8月08日) | 2 lines
Restore default colormap behavior: no color (alpha = 0) for masked data
------------------------------------------------------------------------
r7416 | jdh2358 | 2009年08月07日 10:40:56 -0500 (2009年8月07日) | 1 line
don't fail on window icon load
------------------------------------------------------------------------
r7414 | jdh2358 | 2009年08月07日 05:15:04 -0500 (2009年8月07日) | 1 line
some doc fixes
------------------------------------------------------------------------
r7409 | ryanmay | 2009年08月06日 14:28:16 -0500 (2009年8月06日) | 1 line
Tweak solution for hiding colorbar_doc to sync with trunk.
------------------------------------------------------------------------
r7407 | jdh2358 | 2009年08月06日 13:51:58 -0500 (2009年8月06日) | 1 line
hide colorbar_doc a bit
------------------------------------------------------------------------
r7404 | jdh2358 | 2009年08月06日 11:41:18 -0500 (2009年8月06日) | 1 line
some updates to site docs for release
------------------------------------------------------------------------
r7403 | leejjoon | 2009年08月06日 11:11:30 -0500 (2009年8月06日) | 1 line
fix legend bug ignoring CircleCollection
------------------------------------------------------------------------
r7402 | jdh2358 | 2009年08月06日 10:10:45 -0500 (2009年8月06日) | 1 line
From: Jouni K. S. <jk...@ik...> - 2009年09月22日 10:38:27
Mark Bakker <ma...@gm...> writes:
> I recently started using Eclipse with Pydev. I like it a lot but have not
> been able to get interactive plotting going (which otherwise works
> fine).
Does Pydev have any sort of specific support for matplotlib? I'm asking
because even in the normal Python shell interactive work can be
difficult, depending on the backend, and whatever command-loop magic
IPython does makes it work better. You could try different backends, but
I suspect that Pydev would have to have specific support for integrating
the backend-specific command loop for it to really work.
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Mark B. <ma...@gm...> - 2009年09月22日 09:53:38
Hello list,
I recently started using Eclipse with Pydev. I like it a lot but have not
been able to get interactive plotting going (which otherwise works fine).
My file is simple:
from pylab import *
ion()
plot([1,2,3])
When I run this form within Eclipse, I do see a graphing window open up but
then it disappears again when it is done, before I can even look at it.
Any suggestions on how to keep the graphing window open?
Thanks,
Mark
From: Jae-Joon L. <lee...@gm...> - 2009年09月22日 02:23:37
On Sun, Sep 20, 2009 at 11:45 PM, bwgoudey <bwg...@gm...> wrote:
>
> I'm trying to draw a scatter plot where each point is a different colour and
> is only a single pixel. Unfortunately at the minute, while I can change the
> colour and size, I haven't been able to remove the edges of the markers and
> my single pixel becomes the colour of the edge. I've attached some sample
> code below. Can anyway see what I've done wrong? It currently just gives
> back an error.
>
Your code works as expected with the current svn head. If you're using
older version of mpl, can you try to update and see if it solves the
problem?
If you're using recent version of mpl, please post an error message you got.
> And a related question. Is using scatter the best way to draw a plot of
> single pixels? Or would it be more efficient to use one of the more
> primitive classes to do this?
>
matplotlib basically creates a vector-based plot, and a notion of
"single-pixel" is not very meaningful. While it makes some sense for
raster output formats like png, but still, the result depends on the
dpi of your output. Note that unit for the parameter "s" in the
scatter function is in points(**2). 1 points corresponds to one pixel
in dpi=72. With higher dpi, the scatter points will occupy more than a
single pixel.
Regards,
-JJ
>
> fig = plt.figure()
> ax = fig.add_subplot(111)
>
> x=[1,2,3,4]
> y=[2,3,5,4]
> s=1
> c=[0.4, 0.2, 0.3, 0.5]
>
> prop=dict(edgecolors='none')
> ax.scatter(x,y, s=s, c=c, **prop)
> plt.show()
> --
> View this message in context: http://www.nabble.com/Changing-edge-colour-of-scatterplot-tp25530171p25530171.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Ryan M. <rm...@gm...> - 2009年09月21日 16:32:32
On Mon, Sep 21, 2009 at 5:13 AM, Matthias Michler
<Mat...@gm...>wrote:
> On Wednesday 09 September 2009 17:10:43 Jorge Scandaliaris wrote:
> > Hi,
> > I think I found a bug, but I am not sure if it's in the doc or in a
> method
> > name. In the doc, there is reference to a method *suptitle* in class
> > mpl.figure.Figure. The name sounds strange, but the method exists and
> > works. The example given, though, makes reference to *subtitle*, so
> either
> > the example or the method name are wrong. Here's the link to the doc:
> >
> http://matplotlib.sourceforge.net/api/figure_api.html?highlight=legend#matp
> >lotlib.figure.Figure.suptitle
> >
> > jorge
>
> Hi list,
>
> I can confirm this difference for current SVN (Last Changed Rev: 7802, see
> attachement), too.
> Maybe some of the developers could correct the subtle error.
>
Done. suptitle is the correct name, as it's kind of a "super" title that
appears at the top of a figure with multiple panels, not a subtitle.
Thanks for catching this.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
From: Christian M. <mee...@im...> - 2009年09月21日 14:33:29
Hi,
I'm plotting 2D-ndarrays with pylab.pcolor(). The data contain masked
values and it can happen that entire rows or columns hold only masked
values. Is there a build-in way to omitted such rows/columns? Currently
I'm removing the labels in x and y and the row/columns by hand.
TIA
Christian
From: Janwillem <jwe...@xs...> - 2009年09月21日 07:30:48
P.S.
I noted that the new versions of OOcalc and Exel, 3.0 and 2007, now do allow
log scales other than in decades.
Janwillem wrote:
> 
> Is it possible to have in Matplotlib.pyplot a log (base 10) scale that 
> does go from xmin to xmax where xmin and xmax are not powers of 10 (as 
> in Excel and OOCalc)?? E.g. a scale from 20 to 2500 like you can do in 
> SciDAVis (and Origin and Mathematica) "Scale/from and Scale/to".
> I hope so,
> Thanks, Janwillem
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register
> now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/range-for-log-scale-tp25529894p25530202.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: bwgoudey <bwg...@gm...> - 2009年09月21日 03:45:31
I'm trying to draw a scatter plot where each point is a different colour and
is only a single pixel. Unfortunately at the minute, while I can change the
colour and size, I haven't been able to remove the edges of the markers and
my single pixel becomes the colour of the edge. I've attached some sample
code below. Can anyway see what I've done wrong? It currently just gives
back an error. 
And a related question. Is using scatter the best way to draw a plot of
single pixels? Or would it be more efficient to use one of the more
primitive classes to do this?
fig = plt.figure()
ax = fig.add_subplot(111)
x=[1,2,3,4]
y=[2,3,5,4]
s=1
c=[0.4, 0.2, 0.3, 0.5] 
prop=dict(edgecolors='none')
ax.scatter(x,y, s=s, c=c, **prop)
plt.show()
-- 
View this message in context: http://www.nabble.com/Changing-edge-colour-of-scatterplot-tp25530171p25530171.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Eric F. <ef...@ha...> - 2009年09月20日 17:32:37
Janwillem van Dijk wrote:
> Is it possible to have in Matplotlib.pyplot a log (base 10) scale that 
> does go from xmin to xmax where xmin and xmax are not powers of 10 (as 
> in Excel and OOCalc)?? E.g. a scale from 20 to 2500 like you can do in 
> SciDAVis (and Origin and Mathematica) "Scale/from and Scale/to".
Example using "ipython -pylab":
In [1]:x = arange(2.5, 250)
In [2]:y = x**2
In [3]:semilogy(x, y)
Out[3]:[<matplotlib.lines.Line2D object at 0x91ddc8c>]
In [4]:axis('tight')
Out[4]:(2.5, 249.5, 6.25, 62250.25)
In [5]:axis(ymin=5, ymax=70000)
Out[5]:(2.5, 249.5, 5, 70000)
OK, that was with y, but it works the same with x.
Eric
> I hope so,
> Thanks, Janwillem
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: rbessa <bes...@ho...> - 2009年09月20日 15:16:56
Chris,
regarding the print statements in the function you may want to use something
like:
 total_matches = (xx == x).sum()
 if total_matches != n:
 raise ValueError("x values weren't in sorted order") 
I also have one question:
in function "pchip_eval" instead of " t = (xvec - x[k]) / h[k]" should not
be "t = (xvec - x[k]) / h" ?
Best regards,
Ricardo Bessa
Chris Michalski-3 wrote:
> 
> Recently, I had a need for a monotonic piece-wise cubic Hermite 
> interpolator. Matlab provides the function "pchip" (Piecewise Cubic 
> Hermite Interpolator), but when I Googled I didn't find any Python 
> equivalent. I tried "interp1d()" from scipy.interpolate but this was 
> a standard cubic spline using all of the data - not a piece-wise cubic 
> spline.
> 
> I had access to Matlab documentation, so I spent a some time tracing 
> through the code to figure out how I might write a Python duplicate. 
> This was an massive exercise in frustration and a potent reminder on 
> why I love Python and use Matlab only under duress. I find typical 
> Matlab code is poorly documented (if at all) and that apparently 
> includes the code included in their official releases. I also find 
> Matlab syntax "dated" and the code very difficult to "read".
> 
> Wikipedia to the rescue.
> 
> Not to be deterred, I found a couple of very well written Wikipedia 
> entries, which explained in simple language how to compute the 
> interpolant. Hats off to whoever wrote these entries – they are 
> excellent. The result was a surprising small amount of code 
> considering the Matlab code was approaching 10 pages of 
> incomprehensible code. Again - strong evidence that things are just 
> better in Python...
> 
> Offered for those who might have the same need – a Python pchip() 
> equivalent ==> pypchip(). Since I'm not sure how attachments work (or 
> if they work at all...), I copied the code I used below, followed by a 
> PNG showing "success":
> 
> #
> # pychip.py
> # Michalski
> # 20090818
> #
> # Piecewise cubic Hermite interpolation (monotonic...) in Python
> #
> # References:
> #
> # Wikipedia: Monotone cubic interpolation
> # Cubic Hermite spline
> #
> # A cubic Hermte spline is a third degree spline with each 
> polynomial of the spline
> # in Hermite form. The Hermite form consists of two control points 
> and two control
> # tangents for each polynomial. Each interpolation is performed on 
> one sub-interval
> # at a time (piece-wise). A monotone cubic interpolation is a 
> variant of cubic
> # interpolation that preserves monotonicity of the data to be 
> interpolated (in other
> # words, it controls overshoot). Monotonicity is preserved by 
> linear interpolation
> # but not by cubic interpolation.
> #
> # Use:
> #
> # There are two separate calls, the first call, pchip_init(), 
> computes the slopes that
> # the interpolator needs. If there are a large number of points to 
> compute,
> # it is more efficient to compute the slopes once, rather than for 
> every point
> # being evaluated. The second call, pchip_eval(), takes the slopes 
> computed by
> # pchip_init() along with X, Y, and a vector of desired "xnew"s and 
> computes a vector
> # of "ynew"s. If only a handful of points is needed, pchip() is a 
> third function
> # which combines a call to pchip_init() followed by pchip_eval().
> #
> 
> import pylab as P
> 
> #=========================================================
> def pchip(x, y, xnew):
> 
> # Compute the slopes used by the piecewise cubic Hermite 
> interpolator
> m = pchip_init(x, y)
> 
> # Use these slopes (along with the Hermite basis function) to 
> interpolate
> ynew = pchip_eval(x, y, xnew)
> 
> return ynew
> 
> #=========================================================
> def x_is_okay(x,xvec):
> 
> # Make sure "x" and "xvec" satisfy the conditions for
> # running the pchip interpolator
> 
> n = len(x)
> m = len(xvec)
> 
> # Make sure "x" is in sorted order (brute force, but works...)
> xx = x.copy()
> xx.sort()
> total_matches = (xx == x).sum()
> if total_matches != n:
> print "*" * 50
> print "x_is_okay()"
> print "x values weren't in sorted order --- aborting"
> return False
> 
> # Make sure 'x' doesn't have any repeated values
> delta = x[1:] - x[:-1]
> if (delta == 0.0).any():
> print "*" * 50
> print "x_is_okay()"
> print "x values weren't monotonic--- aborting"
> return False
> 
> # Check for in-range xvec values (beyond upper edge)
> check = xvec > x[-1]
> if check.any():
> print "*" * 50
> print "x_is_okay()"
> print "Certain 'xvec' values are beyond the upper end of 'x'"
> print "x_max = ", x[-1]
> indices = P.compress(check, range(m))
> print "out-of-range xvec's = ", xvec[indices]
> print "out-of-range xvec indices = ", indices
> return False
> 
> # Second - check for in-range xvec values (beyond lower edge)
> check = xvec< x[0]
> if check.any():
> print "*" * 50
> print "x_is_okay()"
> print "Certain 'xvec' values are beyond the lower end of 'x'"
> print "x_min = ", x[0]
> indices = P.compress(check, range(m))
> print "out-of-range xvec's = ", xvec[indices]
> print "out-of-range xvec indices = ", indices
> return False
> 
> return True
> 
> #=========================================================
> def pchip_eval(x, y, m, xvec):
> 
> # Evaluate the piecewise cubic Hermite interpolant with 
> monoticity preserved
> #
> # x = array containing the x-data
> # y = array containing the y-data
> # m = slopes at each (x,y) point [computed to preserve 
> monotonicity]
> # xnew = new "x" value where the interpolation is desired
> #
> # x must be sorted low to high... (no repeats)
> # y can have repeated values
> #
> # This works with either a scalar or vector of "xvec"
> 
> n = len(x)
> mm = len(xvec)
> 
> ############################
> # Make sure there aren't problems with the input data
> ############################
> if not x_is_okay(x, xvec):
> print "pchip_eval2() - ill formed 'x' vector!!!!!!!!!!!!!"
> 
> # Cause a hard crash...
> STOP_pchip_eval2
> 
> # Find the indices "k" such that x[k] < xvec < x[k+1]
> 
> # Create "copies" of "x" as rows in a mxn 2-dimensional vector
> xx = P.resize(x,(mm,n)).transpose()
> xxx = xx > xvec
> 
> # Compute column by column differences
> z = xxx[:-1,:] - xxx[1:,:]
> 
> # Collapse over rows...
> k = z.argmax(axis=0)
> 
> # Create the Hermite coefficients
> h = x[k+1] - x[k]
> t = (xvec - x[k]) / h[k]
> 
> # Hermite basis functions
> h00 = (2 * t**3) - (3 * t**2) + 1
> h10 = t**3 - (2 * t**2) + t
> h01 = (-2* t**3) + (3 * t**2)
> h11 = t**3 - t**2
> 
> # Compute the interpolated value of "y"
> ynew = h00*y[k] + h10*h*m[k] + h01*y[k+1] + h11*h*m[k+1]
> 
> return ynew
> 
> #=========================================================
> def pchip_init(x,y):
> 
> # Evaluate the piecewise cubic Hermite interpolant with 
> monoticity preserved
> #
> # x = array containing the x-data
> # y = array containing the y-data
> #
> # x must be sorted low to high... (no repeats)
> # y can have repeated values
> #
> # x input conditioning is assumed but not checked
> 
> n = len(x)
> 
> # Compute the slopes of the secant lines between successive points
> delta = (y[1:] - y[:-1]) / (x[1:] - x[:-1])
> 
> # Initialize the tangents at every points as the average of the 
> secants
> m = P.zeros(n, dtype='d')
> 
> # At the endpoints - use one-sided differences
> m[0] = delta[0]
> m[n-1] = delta[-1]
> 
> # In the middle - use the average of the secants
> m[1:-1] = (delta[:-1] + delta[1:]) / 2.0
> 
> # Special case: intervals where y[k] == y[k+1]
> 
> # Setting these slopes to zero guarantees the spline connecting
> # these points will be flat which preserves monotonicity
> indices_to_fix = P.compress((delta == 0.0), range(n))
> 
> # print "zero slope indices to fix = ", indices_to_fix
> 
> for ii in indices_to_fix:
> m[ii] = 0.0
> m[ii+1] = 0.0
> 
> alpha = m[:-1]/delta
> beta = m[1:]/delta
> dist = alpha**2 + beta**2
> tau = 3.0 / P.sqrt(dist)
> 
> # To prevent overshoot or undershoot, restrict the position vector
> # (alpha, beta) to a circle of radius 3. If (alpha**2 + 
> beta**2)>9,
> # then set m[k] = tau[k]alpha[k]delta[k] and m[k+1] = 
> tau[k]beta[b]delta[k]
> # where tau = 3/sqrt(alpha**2 + beta**2).
> 
> # Find the indices that need adjustment
> over = (dist > 9.0)
> indices_to_fix = P.compress(over, range(n))
> 
> # print "overshoot indices to fix... = ", indices_to_fix
> 
> for ii in indices_to_fix:
> m[ii] = tau[ii] * alpha[ii] * delta[ii]
> m[ii+1] = tau[ii] * beta[ii] * delta[ii]
> 
> return m
> 
> #= 
> =======================================================================
> def CubicHermiteSpline(x, y, x_new):
> 
> # Piecewise Cubic Hermite Interpolation using Catmull-Rom
> # method for computing the slopes.
> #
> # Note - this only works if delta-x is uniform?
> 
> # Find the two points which "bracket" "x_new"
> found_it = False
> 
> for ii in range(len(x)-1):
> if (x[ii] <= x_new) and (x[ii+1] > x_new):
> found_it = True
> break
> 
> if not found_it:
> print
> print "requested x=<%f> outside X range[%f,%f]" % (x_new, 
> x[0], x[-1])
> STOP_CubicHermiteSpline()
> 
> # Starting and ending data points
> x0 = x[ii]
> x1 = x[ii+1]
> 
> y0 = y[ii]
> y1 = y[ii+1]
> 
> # Starting and ending tangents (using Catmull-Rom spline method)
> 
> # Handle special cases (hit one of the endpoints...)
> if ii == 0:
> 
> # Hit lower endpoint
> m0 = (y[1] - y[0])
> m1 = (y[2] - y[0]) / 2.0
> 
> elif ii == (len(x) - 2):
> 
> # Hit upper endpoints
> m0 = (y[ii+1] - y[ii-1]) / 2.0
> m1 = (y[ii+1] - y[ii])
> 
> else:
> 
> # Inside the field...
> m0 = (y[ii+1] - y[ii-1])/ 2.0
> m1 = (y[ii+2] - y[ii]) / 2.0
> 
> # Normalize to x_new to [0,1] interval
> h = (x1 - x0)
> t = (x_new - x0) / h
> 
> # Compute the four Hermite basis functions
> h00 = ( 2.0 * t**3) - (3.0 * t**2) + 1.0
> h10 = ( 1.0 * t**3) - (2.0 * t**2) + t
> h01 = (-2.0 * t**3) + (3.0 * t**2)
> h11 = ( 1.0 * t**3) - (1.0 * t**2)
> 
> h = 1
> 
> y_new = (h00 * y0) + (h10 * h * m0) + (h01 * y1) + (h11 * h * m1)
> 
> return y_new
> 
> #==============================================================
> def main():
> 
> ############################################################
> # Sine wave test
> ############################################################
> 
> # Create a example vector containing a sine wave.
> x = P.arange(30.0)/10.
> y = P.sin(x)
> 
> # Interpolate the data above to the grid defined by "xvec"
> xvec = P.arange(250.)/100.
> 
> # Initialize the interpolator slopes
> m = pchip_init(x,y)
> 
> # Call the monotonic piece-wise Hermite cubic interpolator
> yvec2 = pchip_eval(x, y, m, xvec)
> 
> P.figure(1)
> P.plot(x,y, 'ro')
> P.title("pchip() Sin test code")
> 
> # Plot the interpolated points
> P.plot(xvec, yvec2, 'b')
> 
> 
> #########################################################################
> # Step function test...
> 
> #########################################################################
> 
> P.figure(2)
> P.title("pchip() step function test")
> 
> # Create a step function (will demonstrate monotonicity)
> x = P.arange(7.0) - 3.0
> y = P.array([-1.0, -1,-1,0,1,1,1])
> 
> # Interpolate using monotonic piecewise Hermite cubic spline
> xvec = P.arange(599.)/100. - 3.0
> 
> # Create the pchip slopes slopes
> m = pchip_init(x,y)
> 
> # Interpolate...
> yvec = pchip_eval(x, y, m, xvec)
> 
> # Call the Scipy cubic spline interpolator
> from scipy.interpolate import interpolate
> function = interpolate.interp1d(x, y, kind='cubic')
> yvec2 = function(xvec)
> 
> # Non-montonic cubic Hermite spline interpolator using
> # Catmul-Rom method for computing slopes...
> yvec3 = []
> for xx in xvec:
> yvec3.append(CubicHermiteSpline(x,y,xx))
> yvec3 = P.array(yvec3)
> 
> # Plot the results
> P.plot(x, y, 'ro')
> P.plot(xvec, yvec, 'b')
> P.plot(xvec, yvec2, 'k')
> P.plot(xvec, yvec3, 'g')
> P.xlabel("X")
> P.ylabel("Y")
> P.title("Comparing pypchip() vs. Scipy interp1d() vs. non- 
> monotonic CHS")
> legends = ["Data", "pypchip()", "interp1d","CHS"]
> P.legend(legends, loc="upper left")
> 
> P.show()
> 
> ###################################################################
> main()
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 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-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/%22Piecewise-Cubic-Hermite-Interpolating-Polynomial%22-in-python-tp25204843p25530075.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Sebastian B. <web...@th...> - 2009年09月20日 14:20:45
Attachments: signature.asc
Janwillem van Dijk wrote:
> Is it possible to have in Matplotlib.pyplot a log (base 10) scale that 
> does go from xmin to xmax where xmin and xmax are not powers of 10 ...
yes.
best regards,
sebastian.
From: Janwillem v. D. <jwe...@xs...> - 2009年09月20日 13:26:03
Is it possible to have in Matplotlib.pyplot a log (base 10) scale that 
does go from xmin to xmax where xmin and xmax are not powers of 10 (as 
in Excel and OOCalc)?? E.g. a scale from 20 to 2500 like you can do in 
SciDAVis (and Origin and Mathematica) "Scale/from and Scale/to".
I hope so,
Thanks, Janwillem
From: Kevin D. <kg...@gm...> - 2009年09月20日 01:25:56
Thanks for a great library and excellent documentation.
I'm using mpl_toolkits.mplot3d.Axes3D (version 0.99.0) to generate a 3D
scatter plot and the web examples have been very useful so far. But I have
these questions to which I can't find answers in the mailing lists or the
website:
a) can you programmatically set the viewing angle (azimuth and elevation)?
I noticed the ax.get_proj() function, but was hoping there would be an
ax.set_proj(elev=..., az=....) function also.
b) can you set all 6 sides of the bounding box to show up, instead of 3, but
set their faces to be transparent (of course!)
Thanks,
Kevin
From: Pierre GM <pgm...@gm...> - 2009年09月19日 16:56:13
All,
I'm trying to use the Cocoa backend on Snow Leopard, using r7791 (GCC 
4.2.1 / Python 2.6.1 from Apple, 64b)
Unfortunately, a simple `plot(range(10),range(10))` gives me an empty 
window and error message as such:
Python[53010:d07] Inconsistent set of values to create NSBitmapImageRep
/Users/pierregm/.local/lib/python2.6/site-packages/matplotlib/backends/ 
backend_cocoaagg.py:140: UninitializedDeallocWarning: leaking an 
uninitialized object of type NSBitmapImageRep
 32) # bits per pixel
Can anybody reproduce it ? Would anybody have some ideas on how to fix 
that ?
Thx a lot in advance.
P.
FYI, the build log can be accessed at: http://pastebin.com/d5b3c1838
From: Thomas H. <th...@gm...> - 2009年09月19日 06:55:51
starting with 
ipython -pylab 
solves it... 
thanks for the help! 
Thomas Hrabe wrote:
> 
> Hi all,
> 
> I am a beginner with matplotlib and doing my first steps with python
> plotting.
> However, I learned that pyplot.show really forces the display of already
> existing plots.
> 
> For instance, when I type 
> In[2]: pyplot.plot([1,2,3])
> Out[2]: [<matplotlib.lines.Line2D object at 0x2e33850>] 
> 
> nothing happens until I type
> 
> In[3]: pyplot.show()
> 
> After that, the interpreter halts until I close the new figure window.
> Only closing enables the interpreter to continue with my later input.
> Moreover, typing 
> In[4]: pyplot.plot([1,2,3])
> 
> again would display the figure immediately. Seems the gtk engine or
> something else must be started up by pyplot.show once and, once running,
> it displays everything else after that instantly.
> How can I tweak pyplot in such way that it would display my figures on the
> very first pyplot.plot call without halting the input?
> 
> Thank you in advance for your help,
> Thomas
> 
> 
-- 
View this message in context: http://www.nabble.com/pyplot.show-tp25518658p25519154.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: sunqiang <sun...@gm...> - 2009年09月19日 06:46:03
oops, maybe use pyplot.ion() not pyplot.ioff(). and pyplot.show() is not
needed.
just pyplot.plot(values) is enough to launch a new figure window and you can
continue plot new lines or legend... interactively.
I test it on my pc: Windows XP, Python 2.5.4, Matplotlib 0.99.0.
On Sat, Sep 19, 2009 at 1:37 PM, Thomas Hrabe <th...@go...> wrote:
> Hi,
>
>
> thank you for the quick reply. Unfortunately, none of both works for me.
>
>
> values = [1,2,3];
>
> pyplot.ioff();
>
> #pyplot.ion();
>
> print pyplot.isinteractive();
>
> pyplot.plot(values);
>
> pyplot.show();
>
> The value (True|False) of interactive mode does not make a difference to
> the plotting.
> Other suggestionst?
>
> Thanks so far!
>
> 2009年9月19日 sunqiang <sun...@gm...>
>
> may be you can try pyplot.ion()? it turns interactive mode on.
>> Hope this helps.
>> On Sat, Sep 19, 2009 at 1:11 PM, Thomas Hrabe <th...@gm...> wrote:
>>
>>>
>>> Hi all,
>>>
>>> I am a beginner with matplotlib and doing my first steps with python
>>> plotting.
>>> However, I learned that pyplot.show really forces the display of already
>>> existing plots.
>>>
>>> For instance, when I type
>>> In[2]: pyplot.plot([1,2,3])
>>> Out[2]: [<matplotlib.lines.Line2D object at 0x2e33850>]
>>>
>>> nothing happens until I type
>>>
>>> In[3]: pyplot.show()
>>>
>>> After that, the interpreter halts until I close the new figure window.
>>> Only
>>> closing enables the interpreter to continue with my later input.
>>> Moreover,
>>> typing
>>> In[4]: pyplot.plot([1,2,3])
>>>
>>> again would display the figure immediately. Seems the gtk engine or
>>> something else must be started up by pyplot.show once and, once running,
>>> it
>>> displays everything else after that instantly.
>>> How can I tweak pyplot in such way that it would display my figures on
>>> the
>>> very first pyplot.plot call without halting the input?
>>>
>>> Thank you in advance for your help,
>>> Thomas
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/pyplot.show-tp25518658p25518658.html
>>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
>>> is the only developer event you need to attend this year. Jumpstart your
>>> developing skills, take BlackBerry mobile applications to market and stay
>>> ahead of the curve. Join us from November 9&#45;12, 2009. Register
>>> now&#33;
>>> http://p.sf.net/sfu/devconf
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>
>>
>
12 messages has been excluded from this view by a project administrator.

Showing results of 480

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