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

Showing results of 458

<< < 1 .. 15 16 17 18 19 > >> (Page 17 of 19)
From: Christoph G. <cg...@uc...> - 2010年07月07日 05:40:31
On 7/6/2010 9:40 PM, David Grudoski wrote:
> Can I install Matplotlib 1.0 for Python 2.7?
> And will it work?
> Thanks
>
Matplotlib 1.0 works well with Python 2.7. However, no official version 
of NumPy has been released for Python 2.7 yet. NumPy 1.4.1 is not quite 
compatible with Python 2.7 and numpy 2.0.dev is a moving target. That's 
why there are no official installers of matplotlib for Python 2.7 yet.
You can try install NumPy 2.0.dev and matplotlib 1.0 from sources as 
described in <http://www.scipy.org/Installing_SciPy> and 
<http://matplotlib.sourceforge.net/users/installing.html>. If you are 
using Windows, experimental installers for Python 2.7 can be found at 
<http://www.lfd.uci.edu/~gohlke/pythonlibs/>.
--Christoph
From: Jae-Joon L. <lee...@gm...> - 2010年07月07日 05:30:24
The axes_grid toolkit in the matplotlib 1.0 have some major changes.
 1. Refactoring
 2. introduced a concept of "axis_direction"
 3. FloatingAxes
1. Refactoring
-------------------
The axes_grid toolkit is now separated into two different modules,
*axes_grid1* and *axisartist*. The original axes_grid heavily used
customized Axes class which has been a source of confusion.
*axes_grid1* is a striped-out version of the axes_grid that does not
use customized Axes class.
A custom Axes implementation is now separated as another module named
*axisartist*.
There still exists *axes_grid* toolkit for backward compatibility.
See
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#what-is-axesgrid-toolkit
Unfortunately, the documentation is not complete (any help will be appreciated)
Examples in the Gallery are converted to use axes_grid1 and
axisartist. And updated documentation can be found here.
http://matplotlib.sourceforge.net/trunk-docs/mpl_toolkits/axes_grid/index.html
If you have a code based on *axes_grid*. the code will mostly work.
2. axis_direction
---------------------
I have introduced a concept of "axis_direction" (this is to support
FloatingAxis more naturally).
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/axisartist.html#rotaion-and-alignment-of-ticklabels
Note that the rotation angle of ticklabels have slightly different meaning!
3. FloatingAxis and FloatingAxes
--------------------------------------------
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#floating-axes
-JJ
From: David G. <Da...@we...> - 2010年07月07日 05:00:30
Can I install Matplotlib 1.0 for Python 2.7?
And will it work?
Thanks
From: jezhill <je...@gm...> - 2010年07月07日 03:54:07
Hi all,
I've been experimenting with the NonUniformImage class. (Actually I want
*uniform* pixel spacing, but I want the image x and y coordinates to have
the correct *scaling* in the style of Matlab's image(x,y,C). The AxesImage
class, created via pylab.imshow, didn't seem to offer that, so I landed on
NonUniformImage, but if there's a better solution I'd be grateful for
tips...)
And here's the problem (or bug?): with my Python 2.5.4 and my matplotlib
1.0, I go and run the 
http://matplotlib.sourceforge.net/examples/pylab_examples/image_nonuniform.html
gallery demo but I decide that I want the y axis reversed (as is common in
image visualization). So I either call pylab.gca().invert_yaxis() at the
end, or I change one of the lines that says
ax.set_ylim(-4,4)
to read
ax.set_ylim(4,-4)
which I believe is the approved method. However the result I get is
non-sensical: no more image variation in the vertical direction. Can anyone
tell me what, if anything, I'm doing wrong? 
Grateful for any hints, --jez
-- 
View this message in context: http://old.nabble.com/NonUniformImage%3A-problem-with-axis-reversal-tp29092028p29092028.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: John H. <jd...@gm...> - 2010年07月07日 01:03:19
On Tue, Jul 6, 2010 at 4:11 PM, John Hunter <jd...@gm...> wrote:
> A big thanks to all the developers who made this release possible.
> Some of the contributions are highlighted below, but a particular
> thanks to Eric Firing for new features and a heroic effort closing and
> fixing bugs, Jae-Joon Lee for continuing to amaze us with the things
> he can make matplotlib do (see gridspec below), Michael Droettboom for
> his tireless work tracking down bugs no one else can figure out,
> Christoph Gohlke for the Windows binaries, Russell Owens for the O X
> binaries, and Benjamin Root and Michiel de Hoon for many bug fixes and
> new features.
And one glaring omission that I left out when assembling tarballs,
binaries, tests and release notes, Ryan May has been hard at work on
the matplotlib event internals, exposing a GUI neutral interface in
support of a new animations API he is working on which I am eagerly
anticipating. He also provided a lot of help in the bug marathon and
improved the auto date tick locating and formatting.
JDH
From: Ryan M. <rm...@gm...> - 2010年07月06日 22:10:40
2010年7月6日 Václav Šmilauer <eu...@ar...>:
> Hello,
>
> I have a simple live-update thread (basically calls set_xdata and
> set_ydata on all lines with the new data, then calls canvas.draw() on
> all figures).
>
> 1. I would like to zoom the figure to contain the whole data range after
> each update, but ONLY in case the figure zoom was not changed manuallu
>
> One idea was to connect to resize_event and scroll_event of the canvas,
> notifying my code that the zoom was change. But in such a case, clicking
> "home" will not revert to automatic zooming.
>
> Is there some better way?
I'm not sure exactly, but you might be able to do something with the
xlim_change/ylim_changed events:
http://matplotlib.sourceforge.net/examples/event_handling/viewlims.html
> 2. Is there an event to be notified when the figure window is close by
> the user?
As Ben said, there's an close_event you can listen for. Here's an example:
http://matplotlib.sourceforge.net/examples/event_handling/close_event.html
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Benjamin R. <ben...@ou...> - 2010年07月06日 21:31:17
Well, as far as I can tell, all zooms are manual unless done explicitly
through the code (maybe you meant a situation where a window resize triggers
a change in the data limits?) Anyway, you might want to look at some of the
set_aspect() options. Also, in the latest version (1.0), we have made some
changes with respect to autoscaling that might impact the behavior of your
program.
As for closing the window, there is the 'close_event' that you can connect
to to trigger any clean-up code for yourself. Don't forget to disconnect
it, as not doing so can cause minor issues in some backends.
Ben Root
2010年7月6日 Václav Šmilauer <eu...@ar...>
> Hello,
>
> I have a simple live-update thread (basically calls set_xdata and
> set_ydata on all lines with the new data, then calls canvas.draw() on
> all figures).
>
> 1. I would like to zoom the figure to contain the whole data range after
> each update, but ONLY in case the figure zoom was not changed manuallu
>
> One idea was to connect to resize_event and scroll_event of the canvas,
> notifying my code that the zoom was change. But in such a case, clicking
> "home" will not revert to automatic zooming.
>
> Is there some better way?
>
> 2. Is there an event to be notified when the figure window is close by
> the user?
>
> Cheers, Vaclav
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: John H. <jd...@gm...> - 2010年07月06日 21:13:04
matplotlib 1.0.0 is available for download at
 https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0/
You can read this announcement with links and rendered figures at
 http://matplotlib.sourceforge.net/users/whats_new.html
This page just covers the highlights -- for the full story, see the
CHANGELOG below.
A big thanks to all the developers who made this release possible.
Some of the contributions are highlighted below, but a particular
thanks to Eric Firing for new features and a heroic effort closing and
fixing bugs, Jae-Joon Lee for continuing to amaze us with the things
he can make matplotlib do (see gridspec below), Michael Droettboom for
his tireless work tracking down bugs no one else can figure out,
Christoph Gohlke for the Windows binaries, Russell Owens for the O X
binaries, and Benjamin Root and Michiel de Hoon for many bug fixes and
new features.
What's new in matplotlib 1.0
============================
HTML5/Canvas backend:
 Simon Ratcliffe and Ludwig Schwardt have released an HTML5/Canvas
 (http://code.google.com/p/mplh5canvas) backend for matplotlib.
 The backend is almost feature complete, and they have done a lot of
 work comparing their html5 rendered images with our core renderer
 Agg. The backend features client/server interactive navigation of
 matplotlib figures in an html5 compliant browser.
Sophisticated subplot grid layout:
 Jae-Joon Lee has written gridspec, a new module for doing complex
 subplot layouts, featuring row and column spans and more. See
 http://matplotlib.sf.net/users/gridspec.html for a tutorial overview.
Easy pythonic subplots:
 Fernando Perez got tired of all the boilerplate code needed to
 create a figure and multiple subplots when using the matplotlib API,
 and wrote a subplots helper function
 (http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.subplots).
 Basic usage allows you to create the figure and an array of subplots
 with numpy indexing (starts with 0). Eg::
 fig, axarr = plt.subplots(2, 2)
 axarr[0,0].plot([1,2,3]) # upper, left
 See
 http://matplotlib.sf.net/examples/pylab_examples/subplots_demo.html
 for several code examples.
Contour fixes and and triplot:
 Ian Thomas has fixed a long-standing bug that has vexed our most
 talented developers for years. contourf now handles interior masked
 regions, and the boundaries of line and filled contours coincide.
 Additionally, he has contributed a new module matplotlib.tri and
 helper function triplot for creating and plotting unstructured
 triangular grids. See
 http://matplotlib.sf.net/api/pyplot_api.html#matplotlib.pyplot.triplot
 for the function and
 http://matplotlib.sf.net/examples/pylab_examples/triplot_demo.html
 for example code.
multiple calls to show supported:
 A long standing request is to support multiple calls to `show`.
 This has been difficult because it is hard to get consistent
 behavior across operating systems, user interface toolkits and
 versions. Eric Firing has done a lot of work on rationalizing show
 across backends, with the desired behavior to make show raise all
 newly created figures and block execution until they are closed.
 Repeated calls to show should raise newly created figures since the
 last call. Eric has done a lot of testing on the user interface
 toolkits and versions and platforms he has access to, but it is not
 possible to test them all, so please report problems to the mailing
 list and bug tracker.
mplot3d graphs can be embedded in arbitrary axes:
 You can now place an mplot3d graph into an arbitrary axes location,
 supporting mixing of 2D and 3D graphs in the same figure, and/or
 multiple 3D graphs in a single figure, using the "projection"
 keyword argument to add_axes or add_subplot. Thanks Ben Root.
 http://matplotlib.sf.net/examples/mplot3d/subplot3d_demo.html
tick_params:
 Eric Firing wrote tick_params, a convenience method for changing the
 appearance of ticks and tick labels. See pyplot function
 tick_params and associated Axes matplotlib.axes.Axes.tick_params.
 http://matplotlib.sf.net/api/pyplot_api.html#matplotlib.pyplot.tick_params
Lots of performance and feature enhancements:
 * Faster magnification of large images, and the ability to zoom in
 to a single pixel
 * Local installs of documentation work better
 * Improved "widgets" -- mouse grabbing is supported
 * More accurate snapping of lines to pixel boundaries
 * More consistent handling of color, particularly the alpha channel,
 throughout the API
Much improved software carpentry:
 The matplotlib trunk is probably in as good a shape as it has ever
 been, thanks to improved software carpentry. We now have a buildbot
 which runs a suite of nose regression tests on every svn commit,
 auto-generating a set of images and comparing them against a set of
 known-goods, sending emails to developers on failures with a
 pixel-by-pixel image comparison. Releases and release bugfixes
 happen in branches, allowing active new feature development to
 happen in the trunk while keeping the release branches stable.
 Thanks to Andrew Straw, Michael Droettboom and other matplotlib
 developers for the heavy lifting.
Bugfix marathon:
 Eric Firing went on a bug fixing and closing marathon, closing over
 100 bugs on the bug tracker with help from Jae-Joon Lee, Michael
 Droettboom, Christoph Gohlke and Michiel de Hoon.
 http://sourceforge.net/tracker/?group_id=80706&atid=560720
CHANGELOG since 0.99
2010年07月05日 Added Ben Root's patch to put 3D plots in arbitrary axes,
 allowing you to mix 3d and 2d in different axes/subplots or
 to have multiple 3D plots in one figure. See
 examples/mplot3d/subplot3d_demo.py - JDH
2010年07月05日 Preferred kwarg names in set_xlim are now 'left' and
 'right'; in set_ylim, 'bottom' and 'top'; original
 kwargs are still accepted without complaint. - EF
2010年07月05日 TkAgg and FltkAgg backends are now consistent with other
 interactive backends: when used in scripts from the
 command line (not from ipython -pylab), show blocks,
 and can be called more than once. - EF
2010年07月02日 Modified CXX/WrapPython.h to fix "swab bug" on solaris so
 mpl can compile on Solaris with CXX6 in the trunk. Closes
 tracker bug 3022815 - JDH
2010年06月30日 Added autoscale convenience method and corresponding
 pyplot function for simplified control of autoscaling;
 and changed axis, set_xlim, and set_ylim so that by
 default, they turn off the autoscaling on the relevent
 axis or axes. Therefore one can call set_xlim before
 plotting a line, for example, and the limits will be
 retained. - EF
2010年06月20日 Added Axes.tick_params and corresponding pyplot function
 to control tick and tick label appearance after an Axes
 has been created. - EF
2010年06月09日 Allow Axes.grid to control minor gridlines; allow
 Axes.grid and Axis.grid to control major and minor
 gridlines in the same method call. - EF
2010年06月06日 Change the way we do split/dividend adjustments in
 finance.py to handle dividends and fix the zero division bug reported
 in sf bug 2949906 and 2123566. Note that volume is not adjusted
 because the Yahoo CSV does not distinguish between share
 split and dividend adjustments making it near impossible to
 get volume adjustement right (unless we want to guess based
 on the size of the adjustment or scrape the html tables,
 which we don't) - JDH
2010年06月06日 Updated dateutil to 1.5 and pytz to 2010h.
2010年06月02日 Add error_kw kwarg to Axes.bar(). - EF
2010年06月01日 Fix pcolormesh() and QuadMesh to pass on kwargs as
 appropriate. - RM
2010年05月18日 Merge mpl_toolkits.gridspec into the main tree. - JJL
2010年05月04日 Improve backend_qt4 so it displays figures with the
 correct size - DSD
2010年04月20日 Added generic support for connecting to a timer for events. This
 adds TimerBase, TimerGTK, TimerQT, TimerWx, and TimerTk to
 the backends and a new_timer() method to each backend's
 canvas to allow ease of creating a new timer. - RM
2010年04月20日 Added margins() Axes method and pyplot function. - EF
2010年04月18日 update the axes_grid documentation. -JJL
2010年04月18日 Control MaxNLocator parameters after instantiation,
 and via Axes.locator_params method, with corresponding
 pyplot function. -EF
2010年04月18日 Control ScalarFormatter offsets directly and via the
 Axes.ticklabel_format() method, and add that to pyplot. -EF
2010年04月16日 Add a close_event to the backends. -RM
2010年04月06日 modify axes_grid examples to use axes_grid1 and axisartist. -JJL
2010年04月06日 rebase axes_grid using axes_grid1 and axisartist modules. -JJL
2010年04月06日 axes_grid toolkit is splitted into two separate modules,
 axes_grid1 and axisartist. -JJL
2010年04月05日 Speed up import: import pytz only if and when it is
 needed. It is not needed if the rc timezone is UTC. - EF
2010年04月03日 Added color kwarg to Axes.hist(), based on work by
 Jeff Klukas. - EF
2010年03月24日 refactor colorbar code so that no cla() is necessary when
 mappable is changed. -JJL
2010年03月22日 fix incorrect rubber band during the zoom mode when mouse
 leaves the axes. -JJL
2010年03月21日 x/y key during the zoom mode only changes the x/y limits. -JJL
2010年03月20日 Added pyplot.sca() function suggested by JJL. - EF
2010年03月20日 Added conditional support for new Tooltip API in gtk backend. - EF
2010年03月20日 Changed plt.fig_subplot() to plt.subplots() after discussion on
 list, and changed its API to return axes as a numpy object array
 (with control of dimensions via squeeze keyword). FP.
2010年03月13日 Manually brought in commits from branch
 ------------------------------------------------------------------------
 r8191 | leejjoon | 2010年03月13日 17:27:57 -0500 (2010年3月13日) | 1 line
 fix the bug that handles for scatter are incorrectly set when dpi!=72.
 Thanks to Ray Speth for the bug report.
2010年03月03日 Manually brought in commits from branch via diff/patch
 (svnmerge is broken)
 ------------------------------------------------------------------------
 r8175 | leejjoon | 2010年03月03日 10:03:30 -0800 (2010年3月03日) | 1 line
 fix arguments of allow_rasterization.draw_wrapper
 ------------------------------------------------------------------------
 r8174 | jdh2358 | 2010年03月03日 09:15:58 -0800 (2010年3月03日) | 1 line
 added support for favicon in docs build
 ------------------------------------------------------------------------
 r8173 | jdh2358 | 2010年03月03日 08:56:16 -0800 (2010年3月03日) | 1 line
 applied Mattias get_bounds patch
 ------------------------------------------------------------------------
 r8172 | jdh2358 | 2010年03月03日 08:31:42 -0800 (2010年3月03日) | 1 line
 fix svnmerge download instructions
 ------------------------------------------------------------------------
 r8171 | jdh2358 | 2010年03月03日 07:47:48 -0800 (2010年3月03日) | 1 line
2010年02月25日 add annotation_demo3.py that demonstrates new functionality. -JJL
2010年02月25日 refactor Annotation to support arbitrary Transform as xycoords
 or textcoords. Also, if a tuple of two coordinates is provided,
 they are interpreted as coordinates for each x and y position.
 -JJL
2010年02月24日 Added pyplot.fig_subplot(), to create a figure and a group of
 subplots in a single call. This offers an easier pattern than
 manually making figures and calling add_subplot() multiple times. FP
2010年02月17日 Added Gokhan's and Mattias' customizable keybindings patch
 for the toolbar. You can now set the keymap.* properties
 in the matplotlibrc file. Newbindings were added for
 toggling log scaling on the x-axis. JDH
2010年02月16日 Committed TJ's filled marker patch for
 left|right|bottom|top|full filled markers. See
 examples/pylab_examples/filledmarker_demo.py. JDH
2010年02月11日 Added 'bootstrap' option to boxplot. This allows bootstrap
 estimates of median confidence intervals. Based on an
 initial patch by Paul Hobson. - ADS
2010年02月06日 Added setup.cfg "basedirlist" option to override setting
 in setupext.py "basedir" dictionary; added "gnu0"
 platform requested by Benjamin Drung. - EF
2010年02月06日 Added 'xy' scaling option to EllipseCollection. - EF
2010年02月03日 Made plot_directive use a custom PlotWarning category, so that
 warnings can be turned into fatal errors easily if desired. - FP
2010年01月29日 Added draggable method to Legend to allow mouse drag
 placement. Thanks Adam Fraser. JDH
2010年01月25日 Fixed a bug reported by Olle Engdegard, when using
 histograms with stepfilled and log=True - MM
2010年01月16日 Upgraded CXX to 6.1.1 - JDH
2009年01月16日 Don't create minor ticks on top of existing major
 ticks. Patch by Neil Crighton. -ADS
2009年01月16日 Ensure three minor ticks always drawn (SF# 2924245). Patch
 by Neil Crighton. -ADS
2010年01月16日 Applied patch by Ian Thomas to fix two contouring
 problems: now contourf handles interior masked regions,
 and the boundaries of line and filled contours coincide. - EF
2009年01月11日 The color of legend patch follows the rc parameters
 axes.facecolor and axes.edgecolor. -JJL
2009年01月11日 adjustable of Axes can be "box-forced" which allow
 sharing axes. -JJL
2009年01月11日 Add add_click and pop_click methods in
 BlockingContourLabeler. -JJL
2010年01月03日 Added rcParams['axes.color_cycle'] - EF
2010年01月03日 Added Pierre's qt4 formlayout editor and toolbar button - JDH
2009年12月31日 Add support for using math text as marker symbols (Thanks to tcb)
 - MGD
2009年12月31日 Commit a workaround for a regression in PyQt4-4.6.{0,1} - DSD
2009年12月22日 Fix cmap data for gist_earth_r, etc. -JJL
2009年12月20日 spines: put spines in data coordinates, add set_bounds()
 call. -ADS
2009年12月18日 Don't limit notch size in boxplot to q1-q3 range, as this
 is effectively making the data look better than it is. - ADS
2009年12月18日 mlab.prctile handles even-length data, such that the median
 is the mean of the two middle values. - ADS
2009年12月15日 Add raw-image (unsampled) support for the ps backend. - JJL
2009年12月14日 Add patch_artist kwarg to boxplot, but keep old default.
 Convert boxplot_demo2.py to use the new patch_artist. - ADS
2009年12月06日 axes_grid: reimplemented AxisArtist with FloatingAxes support.
 Added new examples. - JJL
2009年12月01日 Applied Laurent Dufrechou's patch to improve blitting with
 the qt4 backend - DSD
2009年11月13日 The pdf backend now allows changing the contents of
 a pdf file's information dictionary via PdfPages.infodict. - JKS
2009年11月12日 font_manager.py should no longer cause EINTR on Python 2.6
 (but will on the 2.5 version of subprocess). Also the
 fc-list command in that file was fixed so now it should
 actually find the list of fontconfig fonts. - JKS
2009年11月10日 Single images, and all images in renderers with
 option_image_nocomposite (i.e. agg, macosx and the svg
 backend when rcParams['svg.image_noscale'] is True), are
 now drawn respecting the zorder relative to other
 artists. (Note that there may now be inconsistencies across
 backends when more than one image is drawn at varying
 zorders, but this change introduces correct behavior for
 the backends in which it's easy to do so.)
2009年10月21日 Make AutoDateLocator more configurable by adding options
 to control the maximum and minimum number of ticks. Also
 add control of the intervals to be used for ticking. This
 does not change behavior but opens previously hard-coded
 behavior to runtime modification`. - RMM
2009年10月19日 Add "path_effects" support for Text and Patch. See
 examples/pylab_examples/patheffect_demo.py -JJL
2009年10月19日 Add "use_clabeltext" option to clabel. If True, clabels
 will be created with ClabelText class, which recalculates
 rotation angle of the label during the drawing time. -JJL
2009年10月16日 Make AutoDateFormatter actually use any specified
 timezone setting.This was only working correctly
 when no timezone was specified. - RMM
2009年09月27日 Beginnings of a capability to test the pdf backend. - JKS
2009年09月27日 Add a savefig.extension rcparam to control the default
 filename extension used by savefig. - JKS
From: Jeff W. <js...@fa...> - 2010年07月06日 16:08:23
 On 7/6/10 9:25 AM, Aman Thakral wrote:
> Hi Jeff,
>
> Thanks for your help.
>
> The shapefile works great, but I cannot see the labels. The "DESCRIP" 
> attribute in the shapefile has the labels, but I'm not sure how to 
> apply them to the map.
>
> Thanks,
> Aman
Aman: The shapefile support in Basemap is quite rudimentary (it's an 
area that's waiting for a motivated volunteer to refactor and improve). 
You should have access to all the data in the shapefile, but there is no 
special API for plotting them. See the fillstates.py example for how to 
access the dictionary of attributes associated with each "shape". One 
you have the names, you'll have to plot the text using matplotlib's text 
handling functions.
-Jeff
>
> On Tue, Jul 6, 2010 at 9:27 AM, Jeff Whitaker <js...@fa... 
> <mailto:js...@fa...>> wrote:
>
> On 7/6/10 7:07 AM, Aman Thakral wrote:
>
> Hi,
>
> I have a cylindrical projection that I would like to add some
> streets on. I only need major highways in southern Ontario,
> Canada. Is this functionality included in the Basemap
> package, or would I have to find a customized package/shape
> file (Openstreet?) ?
>
> Thanks,
> Aman
>
>
> Aman: Basemap does not include a streets database (only
> coastlines, rivers, lakes and political boundaries). Shouldn't
> be too hard to find a shapefile that fits your needs though.
>
> -Jeff
>
>
>
>
> -- 
> Aman Thakral
> B.Eng & Biosci, M.Eng Design
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Aman T. <ama...@gm...> - 2010年07月06日 15:26:04
Hi Jeff,
Thanks for your help.
The shapefile works great, but I cannot see the labels. The "DESCRIP"
attribute in the shapefile has the labels, but I'm not sure how to apply
them to the map.
Thanks,
Aman
On Tue, Jul 6, 2010 at 9:27 AM, Jeff Whitaker <js...@fa...> wrote:
> On 7/6/10 7:07 AM, Aman Thakral wrote:
>
>> Hi,
>>
>> I have a cylindrical projection that I would like to add some streets on.
>> I only need major highways in southern Ontario, Canada. Is this
>> functionality included in the Basemap package, or would I have to find a
>> customized package/shape file (Openstreet?) ?
>>
>> Thanks,
>> Aman
>>
>
> Aman: Basemap does not include a streets database (only coastlines,
> rivers, lakes and political boundaries). Shouldn't be too hard to find a
> shapefile that fits your needs though.
>
> -Jeff
>
-- 
Aman Thakral
B.Eng & Biosci, M.Eng Design
From: Jeff W. <js...@fa...> - 2010年07月06日 13:46:06
On 7/6/10 7:07 AM, Aman Thakral wrote:
> Hi,
>
> I have a cylindrical projection that I would like to add some streets 
> on. I only need major highways in southern Ontario, Canada. Is this 
> functionality included in the Basemap package, or would I have to find 
> a customized package/shape file (Openstreet?) ?
>
> Thanks,
> Aman
Aman: Basemap does not include a streets database (only coastlines, 
rivers, lakes and political boundaries). Shouldn't be too hard to find 
a shapefile that fits your needs though.
-Jeff
From: Aman T. <ama...@gm...> - 2010年07月06日 13:14:35
Hi,
I have a cylindrical projection that I would like to add some streets on. I
only need major highways in southern Ontario, Canada. Is this functionality
included in the Basemap package, or would I have to find a customized
package/shape file (Openstreet?) ?
Thanks,
Aman
From: Václav Š. <eu...@ar...> - 2010年07月06日 09:34:58
Hello,
I have a simple live-update thread (basically calls set_xdata and
set_ydata on all lines with the new data, then calls canvas.draw() on
all figures).
1. I would like to zoom the figure to contain the whole data range after
each update, but ONLY in case the figure zoom was not changed manuallu
One idea was to connect to resize_event and scroll_event of the canvas,
notifying my code that the zoom was change. But in such a case, clicking
"home" will not revert to automatic zooming.
Is there some better way?
2. Is there an event to be notified when the figure window is close by
the user?
Cheers, Vaclav
From: German O. <ger...@gm...> - 2010年07月06日 08:31:25
Benjamin
Thanks for your advice. I Modified the example in the way that you say
and now is working well. Basically I load the image before
copy_from_bbox and also I take out the self.ax.clear() in the
timerEvent. I'm including the program example with the animation of a
dot following a circle path with lena.png in the background.
Also I import this program in a Qt4 application and works well
Best regards
German
# For detailed comments on animation and the techniqes used here, see
# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
import os
import sys
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from PyQt4 import QtCore, QtGui
ITERS = 5
import Image
import time
import numpy as np
class BlitQT(FigureCanvas):
 def __init__(self):
 FigureCanvas.__init__(self, Figure())
 self.ax = self.figure.add_subplot(111)
 self.draw()
 file_image="lena.png"
 #The size of Lena png is 480x480
 self.im = Image.open(file_image)
 self.im1 = self.ax.imshow(self.im, origin='lower')
 self.old_size = self.ax.bbox.width, self.ax.bbox.height
 self.ax_background = self.copy_from_bbox(self.ax.bbox)
 self.cnt = 0
 self.acum_cnt=0
 self.angle = np.arange(0,2*np.pi,(2*np.pi)/100.)
 self.x=240+200*np.sin(self.angle)
 self.y=240+200*np.cos(self.angle)
 self.circle_line, = self.ax.plot(self.x[0],self.y[0],"o",
animated=True)
 self.draw()
 self.tstart = time.time()
 self.startTimer(10)
 def timerEvent(self, evt):
 current_size = self.ax.bbox.width, self.ax.bbox.height
 if self.old_size != current_size:
 self.old_size = current_size
 self.draw()
 self.ax_background = self.copy_from_bbox(self.ax.bbox)
 self.restore_region(self.ax_background)
 # update the data
 self.circle_line.set_xdata(self.x[self.cnt:self.cnt+1])
 self.circle_line.set_ydata(self.y[self.cnt:self.cnt+1])
 self.ax.draw_artist(self.circle_line)
 # just redraw the axes rectangle
 self.blit(self.ax.bbox)
 if self.cnt==99:
 self.acum_cnt+=1
 self.cnt=0
 else:
 self.cnt += 1
 if self.acum_cnt==ITERS:
 # print the timing info and quit
 print 'FPS:' , (ITERS*100)/(time.time()-self.tstart)
 sys.exit()
app = QtGui.QApplication(sys.argv)
widget = BlitQT()
widget.show()
sys.exit(app.exec_())
On Mon, Jul 5, 2010 at 6:09 PM, Benjamin Root <ben...@ou...> wrote:
> I should first note that the way to do animations in matplotlib will
> probably be improved soon, the current methods should still be valid.
>
> Ok, the way how I understand how blitting works is that a copy of the static
> background is made before any of the "sprites" are drawn. That static
> background is then redrawn at each frame to avoid having to do a complete
> re-render of it.
>
> So, if you can display a particular image to a plot before calling
> copy_from_bbox(), but after the canvas.draw() call, then the animation
> should work as you would like with blitting, and you won't need to repeat
> the function call to plot the background in the animation.
>
> Note, I have not tried this, so please let us know how this works for you.
> Ben Root
>
>
> On Mon, Jul 5, 2010 at 5:45 AM, German Ocampo <ger...@gm...> wrote:
>>
>> Good morning
>>
>> I have a question regarding to animation in matplotlib using Blit.How
>> can I modify the example animation_blit_qt4.py that is in the
>> matplotlib website, in order to animate data, but instead of a white
>> background I want to have an image (tif or jpg)?
>>
>> Many thanks for your help
>>
>> German
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Jae-Joon L. <lee...@gm...> - 2010年07月06日 02:57:05
On Wed, Jun 30, 2010 at 10:39 AM, Jeremy Conlin <jlc...@gm...> wrote:
> Essentially my question is: how can I get a nice color distribution
> while at the same time avoid the extreme scaling issues associated
> with some data being zero (while all the other data is ~16)?
It seems that plot_surface method does have some issue with NaNs.
I think it is best if you manually adjust the color range. For example,
vmin = np.nanmin(mass)
vmax = np.nanmax(mass)
ax.plot_surface(X, Y, mass, rstride=1, cstride=1, cmap=cm.jet,
 vmin=vmin, vmax=vmax)
IHTH,
-JJ
From: Benjamin R. <ben...@ou...> - 2010年07月05日 17:10:18
I should first note that the way to do animations in matplotlib will
probably be improved soon, the current methods should still be valid.
Ok, the way how I understand how blitting works is that a copy of the static
background is made before any of the "sprites" are drawn. That static
background is then redrawn at each frame to avoid having to do a complete
re-render of it.
So, if you can display a particular image to a plot before calling
copy_from_bbox(), but after the canvas.draw() call, then the animation
should work as you would like with blitting, and you won't need to repeat
the function call to plot the background in the animation.
Note, I have not tried this, so please let us know how this works for you.
Ben Root
On Mon, Jul 5, 2010 at 5:45 AM, German Ocampo <ger...@gm...> wrote:
> Good morning
>
> I have a question regarding to animation in matplotlib using Blit.How
> can I modify the example animation_blit_qt4.py that is in the
> matplotlib website, in order to animate data, but instead of a white
> background I want to have an image (tif or jpg)?
>
> Many thanks for your help
>
> German
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: German O. <ger...@gm...> - 2010年07月05日 10:45:36
Good morning
I have a question regarding to animation in matplotlib using Blit.How
can I modify the example animation_blit_qt4.py that is in the
matplotlib website, in order to animate data, but instead of a white
background I want to have an image (tif or jpg)?
Many thanks for your help
German
From: Stephen T. <obs...@ho...> - 2010年07月05日 08:32:18
Hi, I am having trouble installing matplotlib. I have OS X 10.5 with Python 2.6
 downloaded and installed from python.org.
 (10.5 came with Apple
 Python 2.5). I've also installed NumPy and SciPy for Python 2.6.
I've
 tried EasyInstall, svn, and dmg. The dmg expects Apple Python 2.6 so 
that's out. For the EasyInstall and svn routes I think I must be missing
 some external libraries? Below are some snippets of warnings/error 
messages:
from EasyInstall:
$ easy_install matplotlib
 
 matplotlib: 0.99.3
warning: no files found matching 
'MANIFEST'
warning: no files found matching 'lib/mpl_toolkits'
ld 
warning: in /opt/local/lib/libfreetype.dylib, file is not of required 
architecture
ld warning: in /opt/local/lib/libz.dylib, file is not of
 required architecture
ld warning: in 
/opt/local/lib/libfreetype.dylib, file is not of required architecture
ld
 warning: in /opt/local/lib/libz.dylib, file is not of required 
architecture
ld warning: in /opt/local/lib/libpng12.dylib, file is 
not of required architecture
ld warning: in 
/opt/local/lib/libz.dylib, file is not of required architecture
ld 
warning: in /opt/local/lib/libfreetype.dylib, file is not of required 
architecture
ld warning: in /opt/local/lib/libz.dylib, file is not of
 required architecture
ld: in /opt/local/lib/libxml2.2.dylib, file is
 not of required architecture for architecture ppc
collect2: ld 
returned 1 exit status
ld
 warning: duplicate dylib /opt/local/lib/libz.1.dylib
lipo: can't 
open input file: 
/var/folders/Yh/Yh3On1j+FXW+r-334Wk-vk+++TI/-Tmp-//ccWD9nm4.out (No such
 file or directory)
error: Setup script exited with error: command 
'c++' failed with exit status 1
from SVN:
$ python setup.py build
 
matplotlib: 1.0.svn
ld warning: in /opt/local/lib/libfreetype.dylib, 
file is not of required architecture
ld warning: in 
/opt/local/lib/libz.dylib, file is not of required architecture
ld: 
in /opt/local/lib/libxml2.2.dylib, file is not of required architecture 
for architecture ppc
collect2: ld returned 1 exit status
ld 
warning: duplicate dylib /opt/local/lib/libz.1.dylib
lipo: can't open
 input file: 
/var/folders/Yh/Yh3On1j+FXW+r-334Wk-vk+++TI/-Tmp-//cc6cv190.out (No such
 file or directory)
error: command 'c++' failed with exit status 1
and
 in both throughout the messages there are references to "linker input 
file unused because linking not done" for
powerpc-apple-darwin9-gcc-4.0.1
 and i686-apple-darwin9-gcc-4.0.1.
I'd tried the EPD version also
 (and had it working), but then EasyInstall would direct me to their repositories (for which I did not have a password) so I could not download and install RPy2 and other modules (easily), so I decided to build up 
from individual components...
Any advice you can provide on 
helping me complete the matplotlib installation? I think after this I 
will have the basics for data analysis in Python (with NumPy and SciPy).
Thanks!
Stephen
 		 	 		 
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4 
From: Benjamin R. <ben...@ou...> - 2010年07月05日 02:39:25
Jeremy,
The pcolor function can take a vmin and a vmax parameter if you wish to
control the colorscaling. In addition, you can use a special array
structure called a "masked array" to have pcolor ignore "special" values.
Assuming your data is 'vals':
vals_masked = numpy.ma.masked_array(vals, vals == 0.0)
Note that depending on your situation, doing an equality with with a
floating point value probably isn't very reliable, so be sure to test and
modify to suit your needs. 'vals_masked' can then be passed to pcolor
instead of vals.
I hope this helps,
Ben Root
On Wed, Jun 30, 2010 at 9:39 AM, Jeremy Conlin <jlc...@gm...> wrote:
> I am trying to plot some data over a mesh using the plot_surface
> method. However when I plot my data, everything is the same color
> when I expected to get a nice rainbow of colors as in the example:
> http://matplotlib.sourceforge.net/examples/mplot3d/surface3d_demo.html
>
> I have attached a simple script to show what I did as well as the
> result. Essentially, I just copied the above demo, but put my own
> data in. I think the problem arises because I have "holes" in my
> data, or areas where the data is zero. These zeros throw the scaling
> off so I tried to eliminate their effect, but this messed everything
> up.
>
> Essentially my question is: how can I get a nice color distribution
> while at the same time avoid the extreme scaling issues associated
> with some data being zero (while all the other data is ~16)?
>
> Thanks,
> Jeremy
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Benjamin R. <ben...@ou...> - 2010年07月04日 05:07:59
Ademir,
I am glad it is working for you now. Just as a note, the unicode() function
uses whatever encoding that is default on your system. Therefore, if it is
possible for you to get inputs of strings in other encodings, then it is
considered good practice to handle this at the point of string creation.
Therefore, the rest of the code can simply assume that the strings are in
the system's default encoding.
Therefore, something like your solution would be better than changing the
unicode() call in the suptitle() function.
Ben Root
On Sat, Jul 3, 2010 at 9:22 PM, Ademir Francisco da Silva <
Ade...@it...> wrote:
> Ryan ...,
>
> Very good ..., it works perfectly ...
>
> It's so easy but I didn't remember to use it ...
>
> In fact my problem is slightly more complicated than this because I have
> used textName[ 2 ] instead of literal LotoFácil as I told you ( I know I
> didn't say this before, my fault ), the correct code is ...
>
> fig.suptitle( textName[ 2 ], fontsize = self.fon[ 6 ][ 1 ], fontweight =
> "extra bold",
>
> fontstyle = "italic", color = self.cor[ 608 ][ 1 ],
> lod = True )
>
> however, after your mention about *unicode string* you gave me a good idea
> so I solved my problem this way ...
>
> fig.suptitle( unicode( self.textName[ 2 ], "cp1252" ), fontsize = self.fon[
> 6 ][ 1 ], fontweight = "extra bold",
>
> fontstyle = "italic", color = self.cor[ 608 ][ 1 ],
> lod = True )
>
> and everything works perfectly again.
>
> But I was thinking that the correct way is to fix it there in cbook.py,
> anyway ...
>
> File "C:\Python26\lib\site-packages\matplotlib\cbook.py", line 1682, in
> is_math_text
> s = unicode(s)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 5:
> ordinal not in range(128)
>
>
> Thank you very much for your prompt aid,
>
>
>
> Ademir Francisco da Silva
>
>
> Em 03/07/2010 19:05, Ryan May escreveu:
>
> On Sat, Jul 3, 2010 at 4:12 PM, Ademir Francisco da Silva<Ade...@it...> <Ade...@it...> wrote:
>
> excerpt of may code is ...
> fig.suptitle( "LotoFácil", fontsize = self.fon[ 6 ][ 1 ], fontweight = "extra bold",
> fontstyle = "italic", color = self.cor[ 608 ][ 1 ], lod = True )
>
> but I'm Brazilian and this is not correct for us. Help me please.
>
> Try using a python unicode string instead:
>
> fig.suptitle( u"LotoFácil", fontsize = self.fon[ 6 ][ 1 ], fontweight
> = "extra bold",
> fontstyle = "italic", color = self.cor[ 608 ][
> 1 ], lod = True )
>
> That works for me here (though with the original, I just get missing
> characters, not an error).
>
> Ryan
>
>
>
>
> --
> Ademir Francisco da Silva
>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Ademir F. da S. <Ade...@it...> - 2010年07月04日 02:23:01
 Ryan ...,
Very good ..., it works perfectly ...
It's so easy but I didn't remember to use it ...
In fact my problem is slightly more complicated than this because I have 
used textName[ 2 ] instead of literal LotoFácil as I told you ( I 
know I didn't say this before, my fault ), the correct code is ...
fig.suptitle( textName[ 2 ], fontsize = self.fon[ 6 ][ 1 ], fontweight = 
"extra bold",
 fontstyle = "italic", color = self.cor[ 608 ][ 1 
], lod = True )
however, after your mention about /unicode string/ you gave me a good 
idea so I solved my problem this way ...
fig.suptitle( unicode( self.textName[ 2 ], "cp1252" ), fontsize = 
self.fon[ 6 ][ 1 ], fontweight = "extra bold",
 fontstyle = "italic", color = self.cor[ 608 ][ 1 
], lod = True )
and everything works perfectly again.
But I was thinking that the correct way is to fix it there in cbook.py, 
anyway ...
File "C:\Python26\lib\site-packages\matplotlib\cbook.py", line 1682, in 
is_math_text
 s = unicode(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 5: 
ordinal not in range(128)
Thank you very much for your prompt aid,
Ademir Francisco da Silva
Em 03/07/2010 19:05, Ryan May escreveu:
> On Sat, Jul 3, 2010 at 4:12 PM, Ademir Francisco da Silva
> <Ade...@it...> wrote:
>> excerpt of may code is ...
>> fig.suptitle( "LotoFácil", fontsize = self.fon[ 6 ][ 1 ], fontweight = "extra bold",
>> fontstyle = "italic", color = self.cor[ 608 ][ 1 ], lod = True )
>>
>> but I'm Brazilian and this is not correct for us. Help me please.
> Try using a python unicode string instead:
>
> fig.suptitle( u"LotoFácil", fontsize = self.fon[ 6 ][ 1 ], fontweight
> = "extra bold",
> fontstyle = "italic", color = self.cor[ 608 ][
> 1 ], lod = True )
>
> That works for me here (though with the original, I just get missing
> characters, not an error).
>
> Ryan
>
-- 
Ademir Francisco da Silva
From: Ryan M. <rm...@gm...> - 2010年07月04日 01:05:28
On Tue, Jun 22, 2010 at 2:52 PM, Fa <fa...@gm...> wrote:
> Hi all, I am trying to figure out how I can limit the xaxis date ranges. I
> tried set_xlim(), but that didn't work. The graph consists of dates for the
> xaxis and data for the yaxis. Currently the xaxis is showing the entire
> year's worth of months, even though there are no data for some months. This
> plot is really close to what I want, however, I need to limit the xaxis to a
> only a few months.
>  weeks  = matplotlib.dates.WeekdayLocator()  # every year
>  months  = matplotlib.dates.MonthLocator() # every month
>  monthsFmt = matplotlib.dates.DateFormatter('%b')
>  fig = pylab.figure()
>  ax = fig.add_subplot(111)
>  ax.xaxis.set_major_locator(months)
>  ax.xaxis.set_major_formatter(monthsFmt)
>  ax.xaxis.set_minor_locator(weeks)
>  pylab.bar(x,y)
set_xlim() (or pylab.xlim() ) should work just fine. You should use
the same kind of data as you used for x in your pylab.bar() call.
Personally, I've used datetime objects so the following works:
import datetime
pylab.xlim(datetime.datetime(2010, 03, 01), datetime.datetime(2010, 07, 01))
If this doesn't work for you, I'd need to see what data you're plotting with.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Ryan M. <rm...@gm...> - 2010年07月04日 01:01:31
On Tue, Jun 29, 2010 at 7:16 AM, Bartosz Telenczuk
<b.t...@bi...> wrote:
> Hi all,
>
> I am trying to change the labels of minor ticks, but leave the labels of the major ticks unchanged. To do this, I use the following function:
>
> ax = plt.subplot(111)
> ax.set_xticks([1,3,5])
> ax.set_xticks([2,4], minor=True)
> ax.set_xticklabels(["a", "b"], minor=True)
>
> However, in result of the function both minor and major tick labels are changes. I checked the source code of XAxis.set_ticklabels and it contains following lines:
>
> axis.py: lines 1335-1342
>
>    if minor:
>      self.set_minor_formatter(mticker.FixedFormatter(ticklabels))
>      ticks = self.get_minor_ticks()
>    else:
>      self.set_major_formatter( mticker.FixedFormatter(ticklabels) )
>      ticks = self.get_major_ticks()
>
>    self.set_major_formatter( mticker.FixedFormatter(ticklabels) )
>
> Note that the last lines sets the major tick formatter regardless of the "minor" argument. Is it intentional behaviour?
Thanks for the report (and the good detective work). Fixed in trunk.
(As far as I can tell, this is due to an SVN merge error from the
transforms branch.)
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Ryan M. <rm...@gm...> - 2010年07月03日 22:05:30
On Sat, Jul 3, 2010 at 4:12 PM, Ademir Francisco da Silva
<Ade...@it...> wrote:
> excerpt of may code is ...
> fig.suptitle( "LotoFácil", fontsize = self.fon[ 6 ][ 1 ], fontweight = "extra bold",
> fontstyle = "italic", color = self.cor[ 608 ][ 1 ], lod = True )
>
> but I'm Brazilian and this is not correct for us. Help me please.
Try using a python unicode string instead:
fig.suptitle( u"LotoFácil", fontsize = self.fon[ 6 ][ 1 ], fontweight
= "extra bold",
 fontstyle = "italic", color = self.cor[ 608 ][
1 ], lod = True )
That works for me here (though with the original, I just get missing
characters, not an error).
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Ademir F. da S. <Ade...@it...> - 2010年07月03日 21:12:51
 Hello all,
I have another problem to solve but I guess be easier than my first 
message for this list ..., so let's go again ...,
I have this error message as follow ...
Exception in Tkinter callback
Traceback (most recent call last):
 File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__
 return self.func(*args)
 File "C:\Users\Ademir\Documents\Ademir\Python\Modulos\Lottery.py", 
line 1361, in table_2Rel
 if askyesno( self.textName[ 21 ], self.textName[ 22 ] ): 
self.graphic_2()
 File "C:\Users\Ademir\Documents\Ademir\Python\Modulos\Lottery.py", 
line 1469, in graphic_2
 else: pyplot.draw()
 File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 349, 
in draw
 get_current_fig_manager().canvas.draw()
 File 
"C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py", 
line 258, in draw
 FigureCanvasAgg.draw(self)
 File 
"C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line 
394, in draw
 self.figure.draw(self.renderer)
 File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 55, 
in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "C:\Python26\lib\site-packages\matplotlib\figure.py", line 802, 
in draw
 func(*args)
 File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 55, 
in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "C:\Python26\lib\site-packages\matplotlib\text.py", line 524, in 
draw
 bbox, info = self._get_layout(renderer)
 File "C:\Python26\lib\site-packages\matplotlib\text.py", line 303, in 
_get_layout
 clean_line, ismath = self.is_math_text(line)
 File "C:\Python26\lib\site-packages\matplotlib\text.py", line 978, in 
is_math_text
 if cbook.is_math_text(s):
 File "C:\Python26\lib\site-packages\matplotlib\cbook.py", line 1682, 
in is_math_text
 s = unicode(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 5: 
ordinal not in range(128)
excerpt of may code is ...
fig.suptitle( "LotoFácil", fontsize = self.fon[ 6 ][ 1 ], fontweight = 
"extra bold",
 fontstyle = "italic", color = self.cor[ 608 ][ 1 
], lod = True )
The problem is /LotoFácil/ . I solve it just using LotoFacil instead 
but I'm Brazilian and this is not correct for us. Help me please.
Thank you very much,
-- 
Ademir Francisco da Silva
19 messages has been excluded from this view by a project administrator.

Showing results of 458

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