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
(10) |
2
(23) |
3
(10) |
|
4
(4) |
5
(4) |
6
(5) |
7
(16) |
8
(10) |
9
(8) |
10
(13) |
|
11
(2) |
12
(12) |
13
(15) |
14
(18) |
15
(1) |
16
(5) |
17
|
|
18
(2) |
19
(2) |
20
(3) |
21
(14) |
22
(8) |
23
(4) |
24
|
|
25
|
26
|
27
(3) |
28
(3) |
29
(2) |
30
(1) |
31
(5) |
|
From: James B. <bo...@ll...> - 2005-12-16 16:56:48
|
I am using matplotlib 0.84 on OS X 10.3.9, Agg backend.
The way in which I reverse axes ( axis values getting smaller going
left to right or bottom to top) uses the following code:
ax = subplot(111)
..
xLim = ax.get_xlim()
ax.set_xlim( (xLim[1],xLim[0]))
.
.
I do not know if this is the best way - but it has worked up to now.
If I try to use this method on an axis that uses dates, the method
fails in that no tick labels are generated.
The actual plot is flipped around but there are no tick labels.
In the code below I have attempted to flip the x-axis in the
date_demo2.py from the examples directory.
I have added lines 36-37.
I get the following traceback:
Traceback (most recent call last):
File "_tmp_date_demo2.py", line 46, in ?
setp(labels, rotation=45)
File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/site-packages/matplotlib/pylab.py", line 1533, in setp
ret = _setp(*args, **kwargs)
File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/site-packages/matplotlib/artist.py", line 468, in setp
insp = ArtistInspector(h)
File
"/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
python2.3/site-packages/matplotlib/artist.py", line 260, in __init__
if iterable(o): o = o[0]
IndexError: list index out of range
However if I comment out the lines which rotate the x labels, the code
runs but the resulting plot has no x (date) labels.
Thanks for any help.
--Jim
date_demo2.py
#!/usr/bin/env python
"""
Show how to make date plots in matplotlib using date tick locators and
formatters. See major_minor_demo1.py for more information on
controlling major and minor ticks
"""
import datetime
from pylab import *
from matplotlib.dates import MONDAY, SATURDAY
from matplotlib.finance import quotes_historical_yahoo
from matplotlib.dates import MonthLocator, WeekdayLocator, DateFormatter
date1 = datetime.date( 2002, 1, 5 )
date2 = datetime.date( 2003, 12, 1 )
mondays = WeekdayLocator(MONDAY) # every monday
months = MonthLocator(range(1,13), bymonthday=1) # every
month
monthsFmt = DateFormatter("%b '%y")
quotes = quotes_historical_yahoo('INTC', date1, date2)
if not quotes:
print 'Found no quotes'
raise SystemExit
dates = [q[0] for q in quotes]
opens = [q[1] for q in quotes]
ax = subplot(111)
plot_date(dates, opens, '-')
ax.xaxis.set_major_locator(months)
ax.xaxis.set_major_formatter(monthsFmt)
ax.xaxis.set_minor_locator(mondays)
ax.autoscale_view()
xLim = ax.get_xlim()
ax.set_xlim( (xLim[1],xLim[0]))
#ax.xaxis.grid(False, 'major')
#ax.xaxis.grid(True, 'minor')
labels = ax.get_xticklabels()
setp(labels, rotation=45)
grid(True)
savefig('date_demo2')
|
|
From: Humufr <hu...@ya...> - 2005-12-16 15:08:47
|
Hello, just a small question. There are any plan to remove the limit to plot large array with imshow/matshow? It's impossible now to plot a large array (5000x5000 pixels for example). I remember to have this problem and John told that come from agg who has a limit. I tried to not use agg but Gtk alone and it's very very slow to draw event a 2000x2000 image. It's seems that MPL is doing always in interpolation to draw an array so after a certain size is taking too much memory and I obtain a MemoryError: Couldn't allocate requested memory I would like to know if it's possible or will possible to have an option who are drawing an array with the value of the pixel with any interpolation, resampling or other things? Perhaps something like this will help to plot large array. I would like to create a software in python and matplotlib to work on large fits image but know it's pretty impossible to do it but in the same time pgplot is old and sometime I feel it :) Thanks for this great software. N. |
|
From: Charlie M. <cw...@gm...> - 2005-12-15 16:23:58
|
Another observation/example. Depending on the order of the axes, the
last one is the only one that acts correctly. So I don't think it is
a coord issue.
-------------------------------------------------------------
import matplotlib
from pylab import *
ion()
axs =3D [subplot(221+i, xlim=3D(0,1), ylim=3D(0,1)) for i in xrange(4)]
canvas =3D gcf().canvas
draw()
bgs =3D [canvas.copy_from_bbox(ax.bbox) for ax in axs]
scats =3D [None for ax in axs]
def animate(event):
global canvas, axs, bgs, scats
order =3D [3,0,2,1]
for i in xrange(150):
print i
x, y =3D rand(2,1)
for i in order:
if scats[i] in axs[i].collections: axs[i].collections.remove(scat=
s[i])
for i in order:
scats[i] =3D axs[i].scatter(x, y, animated=3DTrue)
for i in order:
canvas.restore_region(bgs[i])
for i in order:
axs[i].draw_artist(scats[i])
for i in order:
canvas.blit(axs[i].bbox)
canvas.mpl_connect('draw_event', animate)
show()
-------------------------------------------------------------
On 12/14/05, Charlie Moad <cw...@gm...> wrote:
> Correction, this is Agg specific. Not limited to Tk.
>
> On 12/14/05, Charlie Moad <cw...@gm...> wrote:
> > Best shown with this simple example, the top subplot does not clear
> > with the call to restore_region. Any clues???
> >
> > -------------------------------------------------------------
> > import matplotlib
> > matplotlib.use('TkAgg')
> >
> > from pylab import *
> > ion()
> >
> > ax1 =3D subplot(211, xlim=3D(0,1), ylim=3D(0,1))
> > ax2 =3D subplot(212, xlim=3D(0,1), ylim=3D(0,1))
> > canvas =3D ax1.figure.canvas
> >
> > draw()
> > ax1bg =3D canvas.copy_from_bbox(ax1.bbox)
> > ax2bg =3D canvas.copy_from_bbox(ax2.bbox)
> > scat1 =3D None
> > scat2 =3D None
> >
> > def animate(event):
> > global ax1bg, ax2bg, scat1, scat2, canvas
> >
> > for i in xrange(150):
> > print i
> > x, y =3D rand(2,1)
> > if scat1 in ax1.collections: ax1.collections.remove(scat1)
> > if scat2 in ax2.collections: ax2.collections.remove(scat2)
> > scat1 =3D ax1.scatter(x, y, animated=3DTrue)
> > scat2 =3D ax2.scatter(x, y, animated=3DTrue)
> >
> > canvas.restore_region(ax1bg)
> > canvas.restore_region(ax2bg)
> >
> > ax1.draw_artist(scat1)
> > ax2.draw_artist(scat2)
> >
> > canvas.blit(ax1.bbox)
> > canvas.blit(ax2.bbox)
> >
> > ax1.figure.canvas.mpl_connect('draw_event', animate)
> >
> > show()
> > -------------------------------------------------------------
> >
>
|
|
From: Charlie M. <cw...@gm...> - 2005-12-14 21:03:20
|
Correction, this is Agg specific. Not limited to Tk.
On 12/14/05, Charlie Moad <cw...@gm...> wrote:
> Best shown with this simple example, the top subplot does not clear
> with the call to restore_region. Any clues???
>
> -------------------------------------------------------------
> import matplotlib
> matplotlib.use('TkAgg')
>
> from pylab import *
> ion()
>
> ax1 =3D subplot(211, xlim=3D(0,1), ylim=3D(0,1))
> ax2 =3D subplot(212, xlim=3D(0,1), ylim=3D(0,1))
> canvas =3D ax1.figure.canvas
>
> draw()
> ax1bg =3D canvas.copy_from_bbox(ax1.bbox)
> ax2bg =3D canvas.copy_from_bbox(ax2.bbox)
> scat1 =3D None
> scat2 =3D None
>
> def animate(event):
> global ax1bg, ax2bg, scat1, scat2, canvas
>
> for i in xrange(150):
> print i
> x, y =3D rand(2,1)
> if scat1 in ax1.collections: ax1.collections.remove(scat1)
> if scat2 in ax2.collections: ax2.collections.remove(scat2)
> scat1 =3D ax1.scatter(x, y, animated=3DTrue)
> scat2 =3D ax2.scatter(x, y, animated=3DTrue)
>
> canvas.restore_region(ax1bg)
> canvas.restore_region(ax2bg)
>
> ax1.draw_artist(scat1)
> ax2.draw_artist(scat2)
>
> canvas.blit(ax1.bbox)
> canvas.blit(ax2.bbox)
>
> ax1.figure.canvas.mpl_connect('draw_event', animate)
>
> show()
> -------------------------------------------------------------
>
|
|
From: Charlie M. <cw...@gm...> - 2005-12-14 20:45:29
|
Best shown with this simple example, the top subplot does not clear
with the call to restore_region. Any clues???
-------------------------------------------------------------
import matplotlib
matplotlib.use('TkAgg')
from pylab import *
ion()
ax1 =3D subplot(211, xlim=3D(0,1), ylim=3D(0,1))
ax2 =3D subplot(212, xlim=3D(0,1), ylim=3D(0,1))
canvas =3D ax1.figure.canvas
draw()
ax1bg =3D canvas.copy_from_bbox(ax1.bbox)
ax2bg =3D canvas.copy_from_bbox(ax2.bbox)
scat1 =3D None
scat2 =3D None
def animate(event):
global ax1bg, ax2bg, scat1, scat2, canvas
for i in xrange(150):
print i
x, y =3D rand(2,1)
if scat1 in ax1.collections: ax1.collections.remove(scat1)
if scat2 in ax2.collections: ax2.collections.remove(scat2)
scat1 =3D ax1.scatter(x, y, animated=3DTrue)
scat2 =3D ax2.scatter(x, y, animated=3DTrue)
canvas.restore_region(ax1bg)
canvas.restore_region(ax2bg)
ax1.draw_artist(scat1)
ax2.draw_artist(scat2)
canvas.blit(ax1.bbox)
canvas.blit(ax2.bbox)
ax1.figure.canvas.mpl_connect('draw_event', animate)
show()
-------------------------------------------------------------
|
|
From: Ken M. <mc...@ii...> - 2005-12-14 17:10:57
|
On Dec 12, 2005, at 5:56 PM, Neil Pilgrim wrote: > * Is there the equivalent of [axes].set_ydata(), but for contours > or other 3d-data plots? I don't think there's a way to change the data associated with a contour plot, but plotting with imshow() returns an AxesImage object that you can set_data() on. This is no set_extent() method, so if you are also specifying an extent you will need to update it directly by setting "img._extent = (xmin, xmax, ymin, ymax)". > I have an irregular mesh, so I'm not sure that imshow will work > properly on its own, even if I set the data range in some way. There's a cookbook entry about dealing with this situation: http://www.scipy.org/wikis/topical_software/ GriddingIrregularlySpacedData I also recall hearing something about support for irregularly spaced data being added, but it may still be in CVS. Sourceforge just went down, so I can't check the ChangeLog and tell you for certain. :-/ > Having said that, I'm not entirely clear whether pylab is intended > to be > 'the' interface to matplotlib, or just a simplified front-end - it > seems > quite confusing from reading some of the online documents. In my last email, I forgot to add that I rewrote a bunch of the demos to the OO API for plotting (pylab is still used to get the Figure): http://agni.phys.iit.edu/~kmcivor/potpourri/oo_demos.py Ken |
|
From: Ken M. <mc...@ii...> - 2005-12-14 16:54:21
|
On Dec 8, 2005, at 6:55 PM, Neil Pilgrim wrote: > * One of the most obvious obstacles at the moment is that I'm > plotting surface plots, using contour[f] primarily, and haven't > found an obvious way of removing 'previous' results from axes. Axes objects have a cla() method which clears their contents. In pylab, I believe the function cla() clears the current axes. > * Previously I've been using gnuplot to create pngs, which I can > then form into a time series, mostly just plotting the data as a > 'matrix'. While I take it for granted that python/matplotlib are > loading/plotting the data in 'real-time' compared to just flicking > between gnuplot-generated png's, pcolor is rather slow for me, and > I'm unsure exactly what the other approaches (eg. imshow?) are > targeted towards, or when they are appropriate compared to pcolor. pcolor() does a lot of work under the hood to plot things the way it does. imshow() gives you a pseudocolor plot that treats the elements of the matrix as luminescence, which may be exactly what you want. Check out the "pcolor_demo.py" example (which actually uses imshow()!): http://matplotlib.sourceforge.net/screenshots/pcolor_demo.py > However, not only is pcolor slow, but for some reason it defaults > to automatically selecting a different (overly large) automatic > axis-range than contour[f]. It's my understanding that this behavior is by design: pcolor() treats each element Z[i,j] as being in between in between the corresponding X and Y elements (e.g. between X[i,j] and X[i+1,j]). I'm far from certain about this, so please take my answer with a grain of salt. > * Closing the pylab windows using the window-manager results in the > python process continuing - should this be calling some function to > interrupt the show() function? (I'm running GTK/GTKAgg if its > relevant) I'm a bit confused as to what behavior you are seeing. Does show() return so your script can resume executing when you close the pylab window, or does it never block in the first place? > Having said that, I'm not entirely clear whether pylab is intended > to be 'the' interface to matplotlib, or just a simplified front-end > - it seems quite confusing from reading some of the online documents. iPython+pylab appears to be "the" interface to matplotlib for Matlab- style interactive plotting. Pylab on its own is pretty good for quick 'n dirty plotting from scripts (e.g. visualizing the results of some algorithm as you debug and refine it). Matplotlib also has an object-oriented API that is much better to use when you are embedding matplotlib plots in other python applications. The OO API is "the" interface to matplotlib in that it *is* matplotlib... pylab is a wrapper that manages a lot of details to make things more convenient. Ken |
|
From: Ken M. <mc...@ii...> - 2005-12-14 16:32:03
|
On Dec 12, 2005, at 9:46 AM, Zunbeltz Izaola wrote: > I am embeding a Canvas in a wxWidgets dialog. How can i put the > coordinates the mouse ponter in the toolbar (like a StaticText or > something similar )? There's a page on the matplotlib cookbook wiki that describes the different ways to embed matplotlib in wxPython applications: http://www.scipy.org/wikis/topical_software/EmbeddingInWx Please let me know if you have any questions. Ken |
|
From: Jouni K S. <jk...@ik...> - 2005-12-14 16:22:46
|
John Hunter <jdh...@ac...> writes:
> To just make clear, the tick.* properties in rc have
> now been replaced by xtick.* and ytick.*. If you don't update your
> rc file, you'll get lots of warnings when you start matplotlib.
On a related note, how about allowing multiple groups when calling
matplotlib.rc? Now we need to do something like
rc('xtick', **{'major.pad': 2.0, 'major.size': 2.0, 'labelsize': 6.0})
rc('ytick', **{'major.pad': 2.0, 'major.size': 2.0, 'labelsize': 6.0})
which is a bit of a nuisance compared to just calling rc for 'tick'.
Perhaps next someone wants to set the properties separately for all
four borders of the axes, and then we need four calls?
(Also, aliases for the names with dots would be nice, so the key=value
notation could be used in the call.)
The following patch allows calling rc like
rc(('xtick','ytick'), ...)
--
Jouni K Seppänen
|
|
From: John H. <jdh...@ac...> - 2005-12-14 14:15:28
|
>>>>> "Bill" == Bill Dandreta <wjd...@at...> writes:
Bill> matplotlib 0.85 broke rcParams[tick.minor.pad].
Bill> rcParams[xtick.minor.pad] works.
Bill> Could not find a reference to this in the changelog so I
Bill> posted it here in case anybody else had the same prob;em.
Sorry -- this was in API_CHANGES but it should have also been put in
the CHANGELOG. To just make clear, the tick.* properties in rc have
now been replaced by xtick.* and ytick.*. If you don't update your
rc file, you'll get lots of warnings when you start matplotlib.
This problem was compounded by the fact that I never got time to
officially write up the 0.85 release notes and actually announce the
release. Maybe by the time I release 0.86 <wink>
Included below is the updated rc file for 0.85
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file. It should be placed
# in HOME/.matplotlib/matplotlibrc (unix/linux like systems) and
# C:\Documents and Settings\yourname\.matplotlib (win32 systems)
#
# By default, the installer will overwrite the existing file in the
# install path, so if you want to preserve your's, please move it to
# your HOME dir and set the environment variable if necessary.
#
# This file is best viewed in a editor which supports python mode
# syntax highlighting
#
# Blank lines, or lines starting with a comment symbol, are ignored,
# as are trailing comments. Other lines must have the format
#
# key : val # optional comment
#
# Colors: for the color values below, you can either use
# - a matplotlib color string, such as r, k, or b
# - an rgb tuple, such as (1.0, 0.5, 0.0)
# - a hex string, such as ff00ff (no '#' symbol)
# - a scalar grayscale intensity such as 0.75
# - a legal html color name, eg red, blue, darkslategray
#### CONFIGURATION BEGINS HERE
# the default backend; one of GTK GTKAgg GTKCairo FltkAgg QtAgg TkAgg
# Agg Cairo GD GDK Paint PS SVG Template
backend : GTKAgg
numerix : Numeric # Numeric or numarray
interactive : False # see http://matplotlib.sourceforge.net/interactive.html
toolbar : toolbar2 # None | classic | toolbar2
timezone : UTC # a pytz timezone string, eg US/Central or Europe/Paris
# Where your matplotlib data lives if you installed to a non-default
# location. This is where the matplotlib fonts, bitmaps, etc reside
#datapath : /home/jdhunter/mpldata
### LINES
# See http://matplotlib.sourceforge.net/matplotlib.lines.html for more
# information on line properties.
lines.linewidth : 1.0 # line width in points
lines.linestyle : - # solid line
lines.color : blue
lines.marker : None # the default marker
lines.markerfacecolor : blue
lines.markeredgecolor : black
lines.markeredgewidth : 0.5 # the line width around the marker symbol
lines.markersize : 6 # markersize, in points
lines.dash_joinstyle : miter # miter|round|bevel
lines.dash_capstyle : butt # butt|round|projecting
lines.solid_joinstyle : miter # miter|round|bevel
lines.solid_capstyle : projecting # butt|round|projecting
lines.antialiased : True # render lines in antialised (no jaggies)
### PATCHES
# Patches are graphical objects that fill 2D space, like polygons or
# circles. See
# http://matplotlib.sourceforge.net/matplotlib.patches.html for more
# information on patch properties
patch.linewidth : 1.0 # edge width in points
patch.facecolor : blue
patch.edgecolor : black
patch.antialiased : True # render patches in antialised (no jaggies)
### FONT
#
# font properties used by text.Text. See
# http://matplotlib.sourceforge.net/matplotlib.font_manager.html for more
# information on font properties. The 6 font properties used for font
# matching are given below with their default values.
#
# The font.family property has five values: 'serif' (e.g. Times),
# 'sans-serif' (e.g. Helvetica), 'cursive' (e.g. Zapf-Chancery),
# 'fantasy' (e.g. Western), and 'monospace' (e.g. Courier). Each of
# these font families has a default list of font names in decreasing
# order of priority associated with them.
#
# The font.style property has three values: normal (or roman), italic
# or oblique. The oblique style will be used for italic, if it is not
# present.
#
# The font.variant property has two values: normal or small-caps. For
# TrueType fonts, which are scalable fonts, small-caps is equivalent
# to using a font size of 'smaller', or about 83% of the current font
# size.
#
# The font.weight property has effectively 13 values: normal, bold,
# bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as
# 400, and bold is 700. bolder and lighter are relative values with
# respect to the current weight.
#
# The font.stretch property has 11 values: ultra-condensed,
# extra-condensed, condensed, semi-condensed, normal, semi-expanded,
# expanded, extra-expanded, ultra-expanded, wider, and narrower. This
# property is not currently implemented.
#
# The font.size property has 11 values: xx-small, x-small, small,
# medium, large, x-large, xx-large, larger, smaller, length (such as
# 12pt), and percentage. larger and smaller are relative values.
# percentage is not yet implemented.
#
font.family : sans-serif
font.style : normal
font.variant : normal
font.weight : medium
font.stretch : normal
# note that font.size controls default text sizes. To configure
# special text sizes tick labels, axes, labels, title, etc, see the rc
# settings for axes and ticks
font.size : medium
font.serif : New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Bitstream Vera Serif, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
font.sans-serif : Lucida Grande, Verdana, Geneva, Lucida, Bitstream Vera Sans, Arial, Helvetica, sans-serif
font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive
font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy
font.monospace : Andale Mono, Bitstream Vera Sans Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace
font.latex.package : type1cm # This must be an available LaTeX font
#package, like 'times' or 'pslatex' ; only applies if text.usetex is set
### TEXT
# text properties used by text.Text. See
# http://matplotlib.sourceforge.net/matplotlib.text.html for more
# information on text properties
text.color : black
text.usetex : False # use tex/latex for all text handling. See http://matplotlib.sf.net/matplotlib.texmanager.html
text.tex.engine : latex # tex is faster, but latex is required to use special font packages
### AXES
# default face and edge color, default tick sizes,
# default fontsizes for ticklabels, and so on. See
# http://matplotlib.sourceforge.net/matplotlib.axes.html#Axes
axes.hold : True # whether to clear the axes by default on
axes.facecolor : white # axes background color
axes.edgecolor : black # axes edge color
axes.linewidth : 1.0 # edge linewidth
axes.grid : False # display grid or not
axes.titlesize : 14 # fontsize of the axes title
axes.labelsize : 12 # fontsize of the x any y labels
axes.labelcolor : black
polaraxes.grid : True # display grid on polar axes
### TICKS
# see http://matplotlib.sourceforge.net/matplotlib.axis.html#Ticks
xtick.major.size : 4 # major tick size in points
xtick.minor.size : 2 # minor tick size in points
xtick.major.pad : 4 # distance to major tick label in points
xtick.minor.pad : 4 # distance to the minor tick label in points
xtick.color : k # color of the tick labels
xtick.labelsize : 12 # fontsize of the tick labels
xtick.direction : in # direction: in or out
ytick.major.size : 4 # major tick size in points
ytick.minor.size : 2 # minor tick size in points
ytick.major.pad : 4 # distance to major tick label in points
ytick.minor.pad : 4 # distance to the minor tick label in points
ytick.color : k # color of the tick labels
ytick.labelsize : 12 # fontsize of the tick labels
ytick.direction : in # direction: in or out
### GRIDS
grid.color : black # grid color
grid.linestyle : : # dotted
grid.linewidth : 0.5 # in points
### FIGURE
# See http://matplotlib.sourceforge.net/matplotlib.figure.html#Figure
figure.figsize : 8, 6 # figure size in inches
figure.dpi : 80 # figure dots per inch
figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray
figure.edgecolor : white # figure edgecolor
# The figure subplot parameters. All dimensions are fraction of the
# figure width or height
figure.subplot.left : 0.125 # the left side of the subplots of the figure
figure.subplot.right : 0.9 # the right side of the subplots of the figure
figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure
figure.subplot.top : 0.9 # the top of the subplots of the figure
figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots
figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots
### IMAGES
image.aspect : free # free | preserve
image.interpolation : bilinear # see help(imshow) for options
image.cmap : jet # gray | jet
image.lut : 256 # the size of the colormap lookup table
image.origin : upper # lower | upper
### SAVING FIGURES
# the default savefig params can be different for the GUI backends.
# Eg, you may want a higher resolution, or to make the figure
# background white
savefig.dpi : 100 # figure dots per inch
savefig.facecolor : white # figure facecolor when saving
savefig.edgecolor : white # figure edgecolor when saving
# tk backend params
tk.window_focus : False # Maintain shell focus for TkAgg
tk.pythoninspect : False # tk sets PYTHONINSEPCT
# ps backend params
ps.papersize : letter # executive, letter, legal, ledger, A0-A10, B0-B6, C0-C6
ps.useafm : False # use of afm fonts -- breaks mathtext but results in small files
ps.usedistiller : False # Experimental: use ghostscript to distill ps output - may yield smaller files
ps.distiller.res : 6000 # dpi
# Set the verbose flags. This controls how much information
# matplotlib gives you at runtime and where it goes. Ther verbosity
# levels are: silent, helpful, debug, debug-annoying. Any level is
# inclusive of all the levels below it. If you setting is debug,
# you'll get all the debug and helpful messages. When submitting
# problems to the mailing-list, please set verbose to helpful or debug
# and paste the output into your report.
#
# The fileo gives the destination for any calls to verbose.report.
# These objects can a filename, or a filehandle like sys.stdout.
#
# You can override the rc default verbosity from the command line by
# giving the flags --verbose-LEVEL where LEVEL is one of the legal
# levels, eg --verbose-helpful.
#
# You can access the verbose instance in your code
# from matplotlib import verbose.
verbose.level : silent # one of silent, helpful, debug, debug-annoying
verbose.fileo : sys.stdout # a log filename, sys.stdout or sys.stderr
|
|
From: Bill D. <wjd...@at...> - 2005-12-14 14:03:57
|
matplotlib 0.85 broke rcParams[tick.minor.pad]. rcParams[xtick.minor.pad] works. Could not find a reference to this in the changelog so I posted it here in case anybody else had the same prob;em. Bill |
|
From: Charlie M. <cw...@gm...> - 2005-12-14 13:34:35
|
http://www.scipy.org/wikis/topical_software/Animations Check out the "Animating selected plot elements" section. On 12/14/05, Carlos Neves <ca...@gm...> wrote: > Hello, > > I need write a program with 8 plots acquiring datas in 100ms per point > in a dynamic mode. > > I wrote a test program (dynamic_plot_double_v1.py) but I am sure that > it is not the right thing. The plots slow down with the increase the > data arrays. The time to close the application incluse with data array > too. > > Can the matplotlib plot very fast in a dynamic mode? Can Someone give > me directions? > > Thanks advanced. > > Carlos Antonio Neves > LAIA - Laborat=F3rio de Automa=E7=E3o e Instrumenta=E7=E3o Anal=EDtica > http://allchemy2.iq.usp.br/cll/moin.cgi/LAIA_2fEnglish > Instituto de Qu=EDmica da Universidade de S=E3o Paulo - IQ-USP > > #########################################################################= ########### > #!/usr/bin/env python > """ > dynamic_plot_double_v1.py > Dynamic plot test with two graphics. > """ > > import random > import time > import gobject > > from pylab import * > from matplotlib.numerix import arange > > class MyPlotDouble: > > def __init__(self): > > self.x =3D [0] > self.y =3D [0] > self.z =3D [0] > self.tempo_limite_janela_s =3D 10 > > ioff() > self.fig =3D figure(1) > > self.ax1 =3D self.fig.add_subplot(211) > self.ax2 =3D self.fig.add_subplot(212) > > self.ylines =3D self.ax1.plot(self.x, self.y, 'go-', label=3D'lin= e > y', linewidth=3D2) > self.zlines =3D self.ax2.plot(self.x, self.z, 'ro-', label=3D'lin= e > z', linewidth=3D2) > > self.ax1.grid(True) > self.ax1.set_xlim( (0, self.tempo_limite_janela_s) ) > self.ax1.set_ylim( (0, 254) ) > #self.ax1.set_xlabel('time') > self.ax1.set_ylabel('value #1') > self.ax1.set_title('Noise #1') > > self.ax2.grid(True) > self.ax2.set_xlim( (0, self.tempo_limite_janela_s) ) > self.ax2.set_ylim( (0, 254) ) > self.ax2.set_xlabel('time') > self.ax2.set_ylabel('value #2') > self.ax2.set_title('Noise #2') > > self.manager =3D get_current_fig_manager() > > self.tstart =3D time.time() > > gobject.timeout_add(200, self.updatefig) > show() > > def updatefig(self): > self.y.append(random.randint(0, 254)) > self.z.append(random.randint(0, 254)) > self.x.append(time.time() - self.tstart) > > self.ylines[0].set_data(self.x, self.y) > self.zlines[0].set_data(self.x, self.z) > > if (self.x[len(self.x)-1] >=3D self.tempo_limite_janela_s): > self.tempo_limite_janela_s =3D self.tempo_limite_janela_s + > self.tempo_limite_janela_s > self.ax1.set_xlim( (0, self.tempo_limite_janela_s) ) > self.ax2.set_xlim( (0, self.tempo_limite_janela_s) ) > > self.manager.canvas.draw() > > print "%f %i %i %fms\n" % (self.x[len(self.x)-1], > self.y[len(self.y)-1], > self.z[len(self.z)-1], > (self.x[len(self.x)-1] - > self.x[len(self.x) - 2])*1000), > > return True > > app =3D MyPlotDouble() > #########################################################################= ########### > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id=16865&opclick > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Carlos N. <ca...@gm...> - 2005-12-14 13:24:08
|
Hello, I need write a program with 8 plots acquiring datas in 100ms per point in a dynamic mode. I wrote a test program (dynamic_plot_double_v1.py) but I am sure that it is not the right thing. The plots slow down with the increase the data arrays. The time to close the application incluse with data array too. Can the matplotlib plot very fast in a dynamic mode? Can Someone give me directions? Thanks advanced. Carlos Antonio Neves LAIA - Laborat=F3rio de Automa=E7=E3o e Instrumenta=E7=E3o Anal=EDtica http://allchemy2.iq.usp.br/cll/moin.cgi/LAIA_2fEnglish Instituto de Qu=EDmica da Universidade de S=E3o Paulo - IQ-USP ###########################################################################= ######### #!/usr/bin/env python """ dynamic_plot_double_v1.py Dynamic plot test with two graphics. """ import random import time import gobject from pylab import * from matplotlib.numerix import arange class MyPlotDouble: def __init__(self): self.x =3D [0] self.y =3D [0] self.z =3D [0] self.tempo_limite_janela_s =3D 10 ioff() self.fig =3D figure(1) self.ax1 =3D self.fig.add_subplot(211) self.ax2 =3D self.fig.add_subplot(212) self.ylines =3D self.ax1.plot(self.x, self.y, 'go-', label=3D'line y', linewidth=3D2) self.zlines =3D self.ax2.plot(self.x, self.z, 'ro-', label=3D'line z', linewidth=3D2) self.ax1.grid(True) self.ax1.set_xlim( (0, self.tempo_limite_janela_s) ) self.ax1.set_ylim( (0, 254) ) #self.ax1.set_xlabel('time') self.ax1.set_ylabel('value #1') self.ax1.set_title('Noise #1') self.ax2.grid(True) self.ax2.set_xlim( (0, self.tempo_limite_janela_s) ) self.ax2.set_ylim( (0, 254) ) self.ax2.set_xlabel('time') self.ax2.set_ylabel('value #2') self.ax2.set_title('Noise #2') self.manager =3D get_current_fig_manager() self.tstart =3D time.time() gobject.timeout_add(200, self.updatefig) show() def updatefig(self): self.y.append(random.randint(0, 254)) self.z.append(random.randint(0, 254)) self.x.append(time.time() - self.tstart) self.ylines[0].set_data(self.x, self.y) self.zlines[0].set_data(self.x, self.z) if (self.x[len(self.x)-1] >=3D self.tempo_limite_janela_s): self.tempo_limite_janela_s =3D self.tempo_limite_janela_s + self.tempo_limite_janela_s self.ax1.set_xlim( (0, self.tempo_limite_janela_s) ) self.ax2.set_xlim( (0, self.tempo_limite_janela_s) ) self.manager.canvas.draw() print "%f %i %i %fms\n" % (self.x[len(self.x)-1], self.y[len(self.y)-1], self.z[len(self.z)-1], (self.x[len(self.x)-1] - self.x[len(self.x) - 2])*1000), return True app =3D MyPlotDouble() ###########################################################################= ######### |
|
From: Christian K. <ck...@ho...> - 2005-12-14 12:18:44
|
Nils Wagner wrote: > Christian Kristukat wrote: > >>Nils Wagner wrote: >> >> >>>Hi all, >>> >>>I have used the example available via >>> >>>http://matplotlib.sourceforge.net/faq.html#MOVIE >>> >>>to generate animation.mpg. I was able to open this file with mplayer. >>> >> >>videos created with these options work with xanim: >> >>-ovc lavc -lavcopts vcodec=mjpeg >> >> >>Christian >> >> > > Christian, > > Thank you very much. Now it works fine with xanim. > > Just now I have installed mpeg_play > http://bmrc.berkeley.edu/frame/research/mpeg/mpeg_play.html > > ./mpeg_play animation.mpg > specified dither requires 8 bit display > trying -dither color > Junk at start of stream, searching for start code > This is not an MPEG video stream. (0) > Skipping movie 0, "animation.mpg" - not an MPEG stream > X Error of failed request: BadWindow (invalid Window parameter) > Major opcode of failed request: 40 (X_TranslateCoords) > Resource id in failed request: 0x4000002 > Serial number of failed request: 24 > Current serial number in output stream: 24 > > How can I resolve this issue ? I am new to mpg, avi etc. I'd suggest to try different formats with meencoder (vcodec=xxx). Have a look at the mencoder manpage and find '-lavcopts'. There you'll find a list of all supported formats. Christian |
|
From: Nils W. <nw...@me...> - 2005-12-14 12:08:54
|
Christian Kristukat wrote: >Nils Wagner wrote: > >>Hi all, >> >>I have used the example available via >> >>http://matplotlib.sourceforge.net/faq.html#MOVIE >> >>to generate animation.mpg. I was able to open this file with mplayer. >> > >videos created with these options work with xanim: > >-ovc lavc -lavcopts vcodec=mjpeg > > >Christian > > Christian, Thank you very much. Now it works fine with xanim. Just now I have installed mpeg_play http://bmrc.berkeley.edu/frame/research/mpeg/mpeg_play.html ./mpeg_play animation.mpg specified dither requires 8 bit display trying -dither color Junk at start of stream, searching for start code This is not an MPEG video stream. (0) Skipping movie 0, "animation.mpg" - not an MPEG stream X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 40 (X_TranslateCoords) Resource id in failed request: 0x4000002 Serial number of failed request: 24 Current serial number in output stream: 24 How can I resolve this issue ? I am new to mpg, avi etc. Thanks in advance Nils > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >_______________________________________________ >Matplotlib-users mailing list >Mat...@li... >https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jiri P. <po...@ph...> - 2005-12-14 12:02:39
|
Hallo,
I have (another) simple question. How can I make logaritmic histogram?
If I use ( X is an array of input data ):
from pylab import *
logX = log10( X )
n, bins, patches = hist( logX, 50 )
show()
I must take a special care for x-axis labels. Is possible to use
semilogx()? How?
--
JP
|
|
From: Jiri P. <po...@ph...> - 2005-12-14 11:56:05
|
On Tue, Dec 13, 2005 at 09:39:57PM -0600, John Hunter wrote: > > Use epoch2num again > > xlim(epoch2num(amin(ut)), epoch2num(amax(ut))) > Thanke you. -- JP |
|
From: Christian K. <ck...@ho...> - 2005-12-14 11:43:04
|
Nils Wagner wrote: > Hi all, > > I have used the example available via > > http://matplotlib.sourceforge.net/faq.html#MOVIE > > to generate animation.mpg. I was able to open this file with mplayer. videos created with these options work with xanim: -ovc lavc -lavcopts vcodec=mjpeg Christian |
|
From: Nils W. <nw...@me...> - 2005-12-14 11:27:59
|
Hi all, I have used the example available via http://matplotlib.sourceforge.net/faq.html#MOVIE to generate animation.mpg. I was able to open this file with mplayer. However if I try to use it for an animated pdf it failed. \leftline{\pdfstartlink attr{/Border [ 0 0 0]} user{ /Subtype /Link /A << /Type /Action /S /Launch /F (animation.mpg) >> } \includegraphics[width=4.0cm]{borro3.png} \pdfendlink} The reason is that xanim (which is used when I click on borro3.png) cannot display animation.mpg. How can I resolve this problem ? Can I use mencoder to generate a *.mpg which is compatible with xanim ? Moreover, I tried movie15. Unfortunately, only Windows and Mac versions of Adobe Reader provide the necessary plugins. Nils |
|
From: John H. <jdh...@ac...> - 2005-12-14 05:04:34
|
>>>>> "Charlie" == Charlie Moad <cw...@gm...> writes:
Charlie> I am trying to animate a plot with a circle that will be
Charlie> moved around. c = Circle((0,0)) a = gca()
Charlie> a.add_artist(c) draw() # This works
Charlie> c.set_transform(matplotlib.transforms.translation_transform(0.1,
Charlie> 0.1)) draw() # SEGFAULT
Charlie> How do I update the transform?
Hey Charlie,
The segfault is occurring because you are using the
translation_transform incorrectly, though admittedly a more graceful
exit would be preferred. The translation_transform is expecting a
LazyValue instance
def translation_transform(tx, ty):
"""
return a pure tranlational transformation tx and ty are LazyValue
instances (Values or binary opertations on values)
"""
as described at http://matplotlib.sf.net/matplotlib.transforms.html
so rather than
trans = translation_transform(0.1, 0.1)
you want
trans = translation_transform(Value(0.1), Value(0.1))
But in debugging this, I also discovered a bug in the implementation
of translation_transform. Specifically, it should read
def translation_transform(tx, ty):
"""
return a pure tranlational transformation tx and ty are LazyValue
instances (Values or binary opertations on values)
"""
return Affine(one(), zero(), zero(), one(), tx, ty)
where one() has replaced zero()
Below is a complete script, which redefines the translation transform
(and thus works with regular matplotlib -- with CVS just use the
standard translation_transform). Note that with the lazy values of the
transform, you call the "set" method of the lazy value to update the
transform, eg,
trans = translation_transform(x,y)
c.set_transform(trans)
for i in range(0, 800, 5):
x.set(i)
y.set(i)
Complete example below....
JDH
from matplotlib.transforms import zero, one, Value, Affine
from matplotlib.patches import Circle
from pylab import figure, ion, show
def translation_transform(tx, ty):
"""
return a pure tranlational transformation tx and ty are LazyValue
instances (Values or binary opertations on values)
"""
return Affine(one(), zero(), zero(), one(), tx, ty)
ion()
fig = figure()
ax = fig.add_subplot(111)
c = Circle((0,0), radius=20, alpha=0.5)
ax.add_artist(c)
x = Value(0)
y = Value(0)
trans = translation_transform(x,y)
c.set_transform(trans)
for i in range(0, 800, 5):
x.set(i)
y.set(i)
if 0: # uncomment for extra info
verts = c.get_verts()
tverts = trans.seq_xy_tups(verts)
print i
print '\t', trans.as_vec6_val()
print '\t', verts
print '\t', tverts
ax.figure.canvas.draw()
show()
|
|
From: John H. <jdh...@ac...> - 2005-12-14 03:47:00
|
>>>>> "Jiri" == Jiri Polcar <po...@ph...> writes:
Jiri> Hallo, I have array (ut) of numbers represents unix time
Jiri> (number of seconds from 1. 1. 1970) of some evenets:
Jiri> ... 1127164705 1127199439 1127199439 1127199494
Jiri> 1127199640 1127199651 ...
matplotlib interprets dates as days since 0000-00-00 rather than
seconds since the epoch, so you need to convert epoch time with the
epoch2num function in matplotlib.dates and then plot with plot_dates
dnum = epoch2num(ut)
plot_date(dnum, y)
Jiri> I want to plot histogram of this events. I used:
Jiri> from pylab import * n, bins, patches = hist( ut, 50 )
Jiri> setp(patches, 'facecolor', 'g', 'alpha', 0.75) axis([
Jiri> 0.9999*amin(ut), 1.0001*amax(ut), 0, 1.1*amax(n) ]) show()
Jiri> But I want to display labels on x-axis's tics as a date
Jiri> human readable date (for example "Dec 13").
If you are not happy with the default date ticking and formatting
provided by plot_date, you can set you own date tick locator and
formatter. Read about tick locators and formatters here
http://matplotlib.sf.net/matplotlib.ticker.html
and date specific tick locator and formatters here
http://matplotlib.sf.net/matplotlib.dates.html
and in the online Users Guide. See also the *date*.py examples in the
examples directory, http://matplotlib.sf.net/examples
Jiri> It works perfectly. Thanke you. How can I set x-axis range?
Jiri> In case of my real data the histogram is not "centred" and
Jiri> epmty spaces was too huge. In my previous way works:
Jiri> axis([ 0.9999*amin(ut), 1.0001*amax(ut), 0, 1.1*amax(n)
Use epoch2num again
xlim(epoch2num(amin(ut)), epoch2num(amax(ut)))
Note that if you pick the appropriate date locator (which plot_date
tries to do for you automagically), you probably do not need to set
the xlim explicitly, since this is the job of the tick locator's
autoscale method.
JDH
|
|
From: Gary R. <gr...@bi...> - 2005-12-13 23:14:03
|
If I understand what you're asking for, note that the pylab text()
method may do what you want:
from pylab import *
subplot(211)
plot([1,3,2])
ax = subplot(212)
text(0.1, 0.9,
'''the quick brown fox
he quick brown fox
e quick brown fox
quick brown fox''',
verticalalignment='top')
ticklabels = ax.get_xticklabels()+ax.get_xticklines()+\
ax.get_yticklabels()+ax.get_yticklines()
setp(ticklabels, visible=False)
show()
I think the fontdict parameter of text() should be used to set the font
to a fixed-width font for your application. I haven't looked at how to
do this.
Gary R.
Hugo Gamboa wrote:
> Hi to all,
>
> I'm interessed in having an interactive plotting window where one of the
> subplots would be for console output.
> For example I would like to print in a subplot (similar to a console
> output) the several computed values of a selecetd span from some other
> subplot.
>
> Does anyone needed a similar feature?
>
> Thanks in advance for your help.
|
|
From: Jiri P. <po...@ph...> - 2005-12-13 18:55:27
|
It works perfectly. Thanke you.
How can I set x-axis range? In case of my real data the histogram is not
"centred" and epmty spaces was too huge. In my previous way works:
axis([ 0.9999*amin(ut), 1.0001*amax(ut), 0, 1.1*amax(n) ])
--
JP
|
|
From: <rom...@ya...> - 2005-12-13 18:20:47
|
Jiri Polcar wrote:
>
> But I want to display labels on x-axis's tics as a date human readable
> date (for example "Dec 13").
>
I adapted this from finance_demo.py. You will probably have to adjust it
to better suit your needs. It assumes the ut array is sorted.
from pylab import *
from matplotlib.dates import DateFormatter, WeekdayLocator, HourLocator, \
DayLocator, MONDAY, timezone
import time,datetime
ut = [1127164705, 1127199439, 1127199439, 1127199494, 1127199640,
1127199651]
date1 = apply(datetime.date,time.localtime(ut[0])[0:3])
date2 = apply(datetime.date,time.localtime(ut[-1])[0:3])
mondays = WeekdayLocator(MONDAY)
weekFormatter = DateFormatter('%b %d') # Eg, Jan 12
alldays = DayLocator()
ax = subplot(111)
ax.xaxis.set_major_locator(mondays)
ax.xaxis.set_minor_locator(alldays)
ax.xaxis.set_major_formatter(weekFormatter)
dates = []
for u in ut:
year,month,day = time.localtime(u)[0:3]
dates.append(datetime.date(year,month,day).toordinal())
n, bins, patches = hist( dates, 50 )
setp(patches, 'facecolor', 'g', 'alpha', 0.75)
#axis([ 0.9999*amin(ut), 1.0001*amax(ut), 0, 1.1*amax(n) ])
show()
|
|
From: Ryan K. <rya...@gm...> - 2005-12-13 17:43:47
|
I believe you can use TeX with any backend provided you have dvipng install= ed. On 12/13/05, Ken McIvor <mc...@ii...> wrote: > On 12/12/05 10:46, Christian Kristukat wrote: > > I posted this some weeks ago however no solution was found at that time= . > > I'm sorry, I was under the impression that the problem was caused by some= kind > of True-Type font weirdness. Reviewing the exchange, it appears that som= eone > else reproduced the segfault and tracked it down to the presence of a > particular font. > > > Since matplotlib 0.84 - now I'm using mpl from cvs - the WXAgg backend > > crashes with a segfault after calling pylab.show(). > > Please try disabling the WXAgg accelerator to see if that's where the seg= fault > is coming from. Stick the following lines at the beginning of your scrip= t: > > import matplotlib.backends.backend_wxagg > matplotlib.backends.backend_wxagg._use_accelerator(False) > > A short script that consistently reproduces the problem would be helpful,= as > would the output whith verbose.level set to debug-annoying. > > > I use mpl through the OO interface in a larger wxPython application and > > temporarily switched to the WX backend. However it seems that recently = the tex > > support was dropped. I get a NotImplementedError when I set rcParams['u= setex'] =3D > > True. It would be nice to have at least the tex support back, solving t= he > > segfault problem is possibly harder. > > To the best of my knowledge, the WX backend has never supported rendering= text > with TeX. My understanding is that you have to be using a backend that > renders the figure with Agg (e.g. WXAgg) OR the PS backend to get TeX sup= port. > > If the segfault is being cause by the WXAgg accelerator you can switch ba= ck to > the WXAgg backend and disable the accelerator, which would allow you to u= se > TeX again. > > > Btw. I can't find any agg libraries on my system which I could update. = Are they > > part of mpl? > > The most current version of Agg (2.3) is included with the matplotlib sou= rce > distribution. Matplotlib compiles the parts of Agg it needs into each Py= thon > extension instead of linking to a shared library, which is probably why y= ou > couldn't find any Agg libraries on your system. > > Ken > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |