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
(11) |
2
(24) |
3
(24) |
4
(31) |
5
(30) |
6
(27) |
7
(25) |
8
(8) |
9
(2) |
10
(12) |
11
(16) |
12
(33) |
13
(18) |
14
(17) |
15
(3) |
16
(7) |
17
(8) |
18
(22) |
19
(20) |
20
(25) |
21
(10) |
22
(17) |
23
(18) |
24
(23) |
25
(15) |
26
(19) |
27
(6) |
28
(7) |
29
(6) |
30
(1) |
31
(12) |
|
|
|
|
|
From: Jae-Joon L. <lee...@gm...> - 2009-08-27 18:18:38
|
I don't think there is a direct support for this in mpl and I guess only way is to adjust the parameters of each ticks. def set_ticks_both(axis): ticks = list( axis.majorTicks ) # a copy ticks.extend( axis.minorTicks ) for t in ticks: t.tick1On = True # tick marker on left (or bottom) t.tick2On = True # tick marker on right (or top) t.label1On = True # tick label marker on left (or bottom) t.label2On = True # tick label on right (or top) set_ticks_both(ax.yaxis) -JJ On Thu, Aug 27, 2009 at 7:22 AM, Peter Saffrey<pz...@dc...> wrote: > Some of my plots are very wide. I'd like Y axis labels on both sides so > that it's clearer to read the bars towards the right hand side. > > I can change the ticks with yaxis.set_ticks_position("both") but there > doesn't seem to be a similar call for labels. Any ideas? > > Thanks, > > Peter > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Jeff W. <js...@fa...> - 2009-08-27 13:54:44
|
Christian Meesters wrote: >> Christian: That should work, if you created the masked array >> correctly. Why are you creating the mask with data=='NA'? I suspect >> that this always evaluates to False, so you don't get a mask. You >> probably want to check for a numeric value, not a string. For example: >> > Thanks a lot, Jeff! > > Yes, the non-numerical comparison was indeed causing problems - although > I don't understand why. > > However, I can easily inject numerical non-sense values into the array. > As to the 'NA': The data are an R output file. As I don't like R too > much, I'm falling back to Python. > > Christian > > Christian: What type of array is that (data.dtype)? I don't see how a numpy array can have values equal to 'NA', unless it is an array of strings. In that case, it would not be plottable anyway. -Jeff |
From: Christian M. <mee...@im...> - 2009-08-27 13:06:34
|
> Christian: That should work, if you created the masked array > correctly. Why are you creating the mask with data=='NA'? I suspect > that this always evaluates to False, so you don't get a mask. You > probably want to check for a numeric value, not a string. For example: Thanks a lot, Jeff! Yes, the non-numerical comparison was indeed causing problems - although I don't understand why. However, I can easily inject numerical non-sense values into the array. As to the 'NA': The data are an R output file. As I don't like R too much, I'm falling back to Python. Christian |
From: Jeff W. <js...@fa...> - 2009-08-27 11:57:14
|
Christian Meesters wrote: > Hi, > > I have a 2D masked array, created like: > > import numpy as np > data = np.ma.array(data, mask=[data == 'NA']) > > which I would like to plot as a heatmap. > > import pylab > > pylab.pcolor(data) > or > pylab.pcolormesh(data) > > Well, it works with any array, but not if masked values are in there. > Can somebody supply me with a snippet, as I apparently don't get the > relevant piece in the docs (or did not find it ;-) ). > > TIA > Christian > > Christian: That should work, if you created the masked array correctly. Why are you creating the mask with data=='NA'? I suspect that this always evaluates to False, so you don't get a mask. You probably want to check for a numeric value, not a string. For example: import matplotlib.pyplot as plt import numpy as np def func3(x,y): return (1- x/2 + x**5 + y**3)*np.exp(-x**2-y**2) dx, dy = 0.05, 0.05 x = np.arange(-3.0, 3.0001, dx) y = np.arange(-3.0, 3.0001, dy) X,Y = np.meshgrid(x, y) Z = func3(X, Y) Z = np.ma.array(Z, mask=Z>0.5) plt.pcolor(Z) plt.show() -Jeff |
From: Peter S. <pz...@dc...> - 2009-08-27 11:37:17
|
Some of my plots are very wide. I'd like Y axis labels on both sides so that it's clearer to read the bars towards the right hand side. I can change the ticks with yaxis.set_ticks_position("both") but there doesn't seem to be a similar call for labels. Any ideas? Thanks, Peter |
From: Christian M. <mee...@im...> - 2009-08-27 10:30:15
|
Hi, I have a 2D masked array, created like: import numpy as np data = np.ma.array(data, mask=[data == 'NA']) which I would like to plot as a heatmap. import pylab pylab.pcolor(data) or pylab.pcolormesh(data) Well, it works with any array, but not if masked values are in there. Can somebody supply me with a snippet, as I apparently don't get the relevant piece in the docs (or did not find it ;-) ). TIA Christian |
From: Nicolas B. <nbi...@gm...> - 2009-08-26 23:06:16
|
Its great news that the 3D is receiving more polish :) After reading on wikipedia, wouldn't it be nicier to have Phong reflection[1] instead of Gouraud? Maybe it would be too hard, as the Gouraud seems to be implemented directly in Agg (from what others just said...) Anyway, just a suggestion ;) [1] http://en.wikipedia.org/wiki/Phong_reflection_model 2009/8/26 Eric Firing <ef...@ha...> > Reinier Heeres wrote: > > Hi JJ, > > > > Thanks for the examples! I indeed suspected the anti-aliasing as well. > > I'll include an option for linecolors = facecolors soon (probably this > > weekend); it seems to be a good solution. > > No, not in general. There are two problems: it distorts the sizes and > positions of the patches, very slightly, but enough that it might be a > problem in some applications; and it does not work with alpha != 1. > > Eric > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Russell E. O. <ro...@uw...> - 2009-08-26 22:50:18
|
A few things: - What python and matplotlib are you using? I recommend Mac Python from python.org (use the binary installer) and the Mac binary installer for matplotlib. - Note that matplotlib 0.99.0 is current. I suggest you upgrade. - If you are using TkAgg (as seems likely), I'm not sure how well it plays with IDLE. I suggest you try the same example from the command line (Terminal application). - What is your default backend? The normal Mac binary matplotlib uses TkAgg, which is a good choice in this case. But if you build from source the default is Agg, which is probably not what you want. You can set the default explicitly by editing .matplotlib/matplotlibrc (which has probably appeared now that you've run matplotlib once). Here's a slightly shorter example (I confess I'm not familiar with matplotlib.pyplot so I hope this is not deprecated): import pylab pylab.plot([1, 2, 3]) pylab.show() -- Russell In article <426...@we...>, Walid Majid <wm...@ya...> wrote: > Hi, > > I am new to matplotlib and having trouble running a simple example, which I > found on one of the tutorial pages: > > import matplotlib.pyplot as plt > plt.plot([1,2,3]) > plt.ylabel('some numbers') > plt.show() > > The problem I encounter is that no plot actually shows up when I run the > above sequence on my idle session. > I am running on Mac OS X 10.5.6 and if anyone can give me some help, I would > appreciate it. > > Python: 2.5.4 > idle: 1.2.4 > matplotlib: 0.98.5.3 > > WM |
From: Xavier G. <xav...@gm...> - 2009-08-26 22:47:16
|
>> Hi, >> >> I have already asked about that but I'm back once again :) >> >> The way I use matplotlib may be a corner case: >> I'm often looking at large (4k x 4k) images and I do want to see the >> pixels values moving the mouse over the display. >> imshow does a great job but all the backend only display "x= y=". >> I would love to see "x= y= Z=" (or "value="...call it the way you want ;)) >> >> What is the best way to do that? >> imshow is great because there is nothing to connect to see x and y >> values on the backend. >> I need to code something as simple as imshow to get also the pixel values. >> > > The easiest way I can think of is to override Axes.format_coord > method. A pseudo code might look like below > > def report_pixel(x, y): > # get the pixel value > v = get_pixel_value_of_your_image(x,y) > > return "x=%f y=%f value=%f" % (x, y, v) > > ax = gca() > ax.format_coord = report_pixel > > The code will become more complicated if you want to support multiple images. > This solution is far from elegant, but maybe the easiest one. > > -JJ > > >> Is there really on way to get that as a new option in imshow? at least >> in one of the backend (as a starting point) >> >> Best Regards, >> Xavier >> Thanks it does work but I still wonder why it is not an option in imshow Xavier |
From: dek <dr...@ho...> - 2009-08-26 20:15:48
|
I made a toolbar in a figure originally tied to a canvas via wx backend means. I cleared the figure, assigned a new canvas, and want to assign the same toolbar to it. Recreating the toolbar and setting it in wx caused odd display transition (it was slow I suppose?). I've been able to to get this mostly to work by simply using: self.toolbar.canvas = self.canvas self.toolbar._idDrag=self.canvas.mpl_connect('motion_notify_event',\ self.toolbar.mouse_move) This works so long as a toolbar button isn't pressed originally upon putting in a new canvas, in which case the user would have to repress the previously pressed button to make it work. Any ideas on what I can do? -- View this message in context: http://www.nabble.com/assign-pre-existing-toolbar-to-new-canvas-tp25157107p25157107.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Eric F. <ef...@ha...> - 2009-08-26 17:29:51
|
Reinier Heeres wrote: > Hi JJ, > > Thanks for the examples! I indeed suspected the anti-aliasing as well. > I'll include an option for linecolors = facecolors soon (probably this > weekend); it seems to be a good solution. No, not in general. There are two problems: it distorts the sizes and positions of the patches, very slightly, but enough that it might be a problem in some applications; and it does not work with alpha != 1. Eric |
From: Michael D. <md...@st...> - 2009-08-26 17:15:50
|
Jae-Joon Lee wrote: > On Wed, Aug 26, 2009 at 6:22 AM, German Ocampo<ger...@gm...> wrote: > >> Hello >> >> Are there some way to take out the gridlines from a surface in mplot3D >> and get a smooth colour change? >> >> > Micheal, > If my understanding is correct, we will see this artifacts even with > the Gouraud shading. What do you think? > The Agg Gouraud function deals with these artifacts by oversizing the area by half a pixel, which is more or less equivalent to what the "edgecolor == facecolor" trick does, except with Gouraud shading the edgecolor is not constant, but interpolated. So, no, the artifacts will not be there. There are other inherent artifacts related to the triangulation itself, of course ;) Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Ignacio A. S. <ign...@gm...> - 2009-08-26 15:41:54
|
I have a problem with zoom/pan in matplot NavigationToolbar. I am using networkx to generate graphs and it's interface to matplot to draw it. When I use zoom/pan with the NavigationToolbar, the edges and the labels don't resize. I don't know if this is a networkx or a matplotlib problem. This is my source code: import sys, os, random from PyQt4 import QtGui, QtCore from numpy import arange, sin, pi from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar from matplotlib.figure import Figure import networkx as nx progname = os.path.basename(sys.argv[0]) progversion = "0.1" class MyMplCanvas(FigureCanvas): """Ultimately, this is a QWidget (as well as a FigureCanvasAgg, etc.).""" def __init__(self, parent=None, width=5, height=4, dpi=100): fig = Figure(figsize=(width, height), dpi=dpi) self.axes = fig.add_subplot(111) self.axes.set_navigate(True) # We want the axes cleared every time plot() is called self.axes.hold(False) self.compute_initial_figure() # FigureCanvas.__init__(self, fig) self.setParent(parent) FigureCanvas.setSizePolicy(self, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) FigureCanvas.updateGeometry(self) def compute_initial_figure(self): pass class MyStaticMplCanvas(MyMplCanvas): """Simple canvas with a sine plot.""" def __init__(self,*args,**kwargs): MyMplCanvas.__init__(self,*args,**kwargs) self.mpl_connect('pick_event',self.onpick) def compute_initial_figure(self): G=nx.star_graph(20) pos=nx.graphviz_layout(G) nodes = nx.draw_networkx_nodes(G,pos,ax=self.axes) print nodes nodes.set_picker(True) edges = nx.draw_networkx_edges(G,pos,ax=self.axes) self._labels = range(len(G.nodes())) labels=dict(zip(self._labels,self._labels)) nx.draw_networkx_labels(G, pos, ax=self.axes,labels=labels) def onpick(self,event): ind=event.ind[0] print self._labels[ind] return True class ApplicationWindow(QtGui.QMainWindow): def __init__(self): QtGui.QMainWindow.__init__(self) self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self.setWindowTitle("application main window") self.file_menu = QtGui.QMenu('&File', self) self.file_menu.addAction('&Quit', self.fileQuit, QtCore.Qt.CTRL + QtCore.Qt.Key_Q) self.menuBar().addMenu(self.file_menu) self.help_menu = QtGui.QMenu('&Help', self) self.menuBar().addSeparator() self.menuBar().addMenu(self.help_menu) self.help_menu.addAction('&About', self.about) self.main_widget = QtGui.QWidget(self) l = QtGui.QVBoxLayout(self.main_widget) sc = MyStaticMplCanvas(self.main_widget, width=5, height=3, dpi=100) l.addWidget(sc) bar = NavigationToolbar(sc,self) l.addWidget(bar) self.main_widget.setFocus() self.setCentralWidget(self.main_widget) def fileQuit(self): self.close() def closeEvent(self, ce): self.fileQuit() def about(self): QtGui.QMessageBox.about(self, "About %s" % progname, u"""%(prog)s version %(version)s Copyright \N{COPYRIGHT SIGN} 2005 Florent Rougon, 2006 Darren Dale This program is a simple example of a Qt4 application embedding matplotlib canvases. It may be used and modified with no restriction; raw copies as well as modified versions may be distributed without limitation.""" % {"prog": progname, "version": progversion}) qApp = QtGui.QApplication(sys.argv) aw = ApplicationWindow() aw.setWindowTitle("%s" % progname) aw.show() sys.exit(qApp.exec_()) |
From: Reinier H. <re...@he...> - 2009-08-26 15:20:12
|
Hi JJ, Thanks for the examples! I indeed suspected the anti-aliasing as well. I'll include an option for linecolors = facecolors soon (probably this weekend); it seems to be a good solution. After that I'll try to implement usage of the Gouraud shading, although I fear that this will not look nice with edgecolors=facecolors, so anti-aliasing might have to be turned off in that case. Is it perhaps possible to only render the surface with AA off? Cheers, Reinier On Wed, Aug 26, 2009 at 5:03 PM, Jae-Joon Lee<lee...@gm...> wrote: > On Wed, Aug 26, 2009 at 6:22 AM, German Ocampo<ger...@gm...> wrote: >> Hello >> >> Are there some way to take out the gridlines from a surface in mplot3D >> and get a smooth colour change? > > I think surface plot does not draw any gridlines by default (linewidth > set to 0). Maybe you're referring the artifacts between each surface > elements, as can be seen in the example below > > http://matplotlib.sourceforge.net/examples/mplot3d/surface3d_demo.html > > My guess is that they are artifacts of antialiasing that edges gets > somewhat transparent. > > So, you may turn off antialiasing, but plot gets a bit ugly. Or you > may actually strokes the edges with their face colors. > > See the example plot attached. > > The second example is created with high resolution grid to demonstrate > smooth color variation (this is extremely slow to render though). > > It may be better if mplot3d has option for this, but I'll leave it to > Reinier, the original author of mplot3d. > > Micheal, > If my understanding is correct, we will see this artifacts even with > the Gouraud shading. What do you think? > > Regards, > > -JJ > > ps. I'm resending this message with external link to images due to the > attachment size limit in mpl list. > > http://dl.getdropbox.com/u/178748/mpl/mplo3d_test_lowres.png > http://dl.getdropbox.com/u/178748/mpl/mplo3d_test_hires.png -- Reinier Heeres Tel: +31 6 10852639 |
From: Jae-Joon L. <lee...@gm...> - 2009-08-26 15:04:00
|
On Wed, Aug 26, 2009 at 6:22 AM, German Ocampo<ger...@gm...> wrote: > Hello > > Are there some way to take out the gridlines from a surface in mplot3D > and get a smooth colour change? > I think surface plot does not draw any gridlines by default (linewidth set to 0). Maybe you're referring the artifacts between each surface elements, as can be seen in the example below http://matplotlib.sourceforge.net/examples/mplot3d/surface3d_demo.html My guess is that they are artifacts of antialiasing that edges gets somewhat transparent. So, you may turn off antialiasing, but plot gets a bit ugly. Or you may actually strokes the edges with their face colors. See the example plot attached. The second example is created with high resolution grid to demonstrate smooth color variation (this is extremely slow to render though). It may be better if mplot3d has option for this, but I'll leave it to Reinier, the original author of mplot3d. Micheal, If my understanding is correct, we will see this artifacts even with the Gouraud shading. What do you think? Regards, -JJ ps. I'm resending this message with external link to images due to the attachment size limit in mpl list. http://dl.getdropbox.com/u/178748/mpl/mplo3d_test_lowres.png http://dl.getdropbox.com/u/178748/mpl/mplo3d_test_hires.png |
From: ms <dev...@gm...> - 2009-08-26 15:01:40
|
Hi, Can anyone help me to find how to draw an area chart (something like http://commons.wikimedia.org/wiki/File:Browser_Wars.png ) with MPL? Googling and the MPL gallery didn't help. thanks! m. |
From: German O. <ger...@gm...> - 2009-08-26 13:54:09
|
Mike thanks for your answer. I will wait for this option. regards german On Wed, Aug 26, 2009 at 3:45 PM, Michael Droettboom<md...@st...> wrote: > Smooth Gouraud shading on surface plots is being worked on, but is not yet > implemented. > > Mike > > German Ocampo wrote: >> >> Hello >> >> Are there some way to take out the gridlines from a surface in mplot3D >> and get a smooth colour change? >> >> Thanks >> >> German >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day trial. Simplify your report design, integration and deployment - and >> focus on what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > |
From: Michael D. <md...@st...> - 2009-08-26 13:52:04
|
Smooth Gouraud shading on surface plots is being worked on, but is not yet implemented. Mike German Ocampo wrote: > Hello > > Are there some way to take out the gridlines from a surface in mplot3D > and get a smooth colour change? > > Thanks > > German > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: German O. <ger...@gm...> - 2009-08-26 10:22:45
|
Hello Are there some way to take out the gridlines from a surface in mplot3D and get a smooth colour change? Thanks German |
From: Werner F. B. <wer...@fr...> - 2009-08-26 10:05:07
|
Chris, Christopher Barker wrote: > Werner F. Bruhin wrote: >> The other problem I have is that the xtick_labels are cut off at the >> bottom when the frame is resized below a certain size. How can I >> prevent this? > > I don't think MPL yet has a system for making things fit, so you need > to change the size/position of your axes object: > > axes.set_position(pos, which='both') > > """ > Set the axes position with: > > pos = [left, bottom, width, height] > """ > > these are in "figure units" which are relative to figure size, from 0 > to 1. Unfortunately, what this means is that the amount of space for > the axis labels varies with the size of the figure, as you've discovered. > > > The default for a single axes in a figure is: > > (0.125, 0.1, 0.9, 0.9) > > so you might try something like: > > axes.set_position((0.125, 0.15, 0.9, 0.85) ) > > what is best depends on what size you want your figure to look good at. Thanks for this tip, will play around with this a bit. First try shifts the figure of the panel on the top left and right, so this will need a bit more digging on my part. Werner |
From: Auré G. <aur...@ya...> - 2009-08-26 08:14:36
|
> The patches hide the contourf correctly, as expected, but not the > contour lines... Sounds like a zorder problem: http://matplotlib.sourceforge.net/examples/pylab_examples/zorder_demo.html -- Jouni K.. Sepp?nen I'd missed that point... Thanks, it's working fine now ! Cheers, Aure |
From: John H. <jd...@gm...> - 2009-08-26 01:19:18
|
On Tue, Aug 25, 2009 at 4:59 PM, Patrick Rynhart<pry...@gm...> wrote: > Thanks again for your help. Do you think that testing for the version > of the Visual C redistributable is required during an install of > matplotlib (and/or possibly at runtime). This shouldn't be an issue with recent binaries of mpl, eg 0.99 and later, so hopefully we won't have to worry about this install check. I think we've fixed the MSVCP71.DLL problem, but if you experience otherwise let us know. JDH |
From: Patrick R. <pry...@gm...> - 2009-08-26 01:14:18
|
Hi again, Just to update you, copying across the Visual C/C++ runtime library (MSVCP71.DLL) from a Windows XP SP3 install to C:\Python25\Lib\site-packages\matplotlib on Windows Server 2008 does in fact appear to work correctly with matplotlib after all. Regards, Patrick -- Dr Patrick Rynhart Linux Systems Administrator / Team Leader IT Support Group School of Engineering and Advanced Technology AgHort A Room 3.61 Massey University (Turitea Campus) NEW ZEALAND Phone +64 6 356 9099 extn 2444 |
From: Patrick R. <pry...@gm...> - 2009-08-25 21:59:53
|
On Fri, Aug 7, 2009 at 7:27 PM, John Hunter<jd...@gm...> wrote: > On Thu, Aug 6, 2009 at 8:48 PM, Patrick Rynhart<pry...@gm...> wrote: >> Dear all, >> >> We are using Python 2.5, matplotlib and NumPy on Windows to assist >> with the teaching for an undergraduate paper. On a small number of >> installations, an error attempting to load some required DLL's is >> being reported (on approx 3 machines out of approximately 60). There >> doesn't appear to be any pattern with this - we can seen it on one >> install of Windows Server 2008 and also on various versions of Windows >> XP (Professional and Home). >> >> Symptoms are, after a "from pylab import *", the following traceback: >> >> Traceback (most recent call last): >> File "C:\Documents and >> Settings\Jo\workspace\test\src\root\nested\__init__.py", line 2, in >> <module> >> from pylab import * >> File "C:\Python25\Lib\site-packages\pylab.py", line 1, in <module> >> from matplotlib.pylab import * >> File "C:\Python25\Lib\site-packages\matplotlib\pylab.py", line 206, >> in <module> >> from matplotlib import mpl # pulls in most modules >> File "C:\Python25\Lib\site-packages\matplotlib\mpl.py", line 1, in <module> >> from matplotlib import artist >> File "C:\Python25\Lib\site-packages\matplotlib\artist.py", line 4, in <module> >> from transforms import Bbox, IdentityTransform, TransformedBbox, >> TransformedPath >> File "C:\Python25\Lib\site-packages\matplotlib\transforms.py", line >> 34, in <module> >> from matplotlib._path import affine_transform >> ImportError: DLL load failed: The specified module could not be found. > > We have seen this problem several times before, and have labored hard > to banish it, but it always has a way of coming back to haunt us. I > am aware of a bug in python2.6 which causes mingw to build broken > win32 binaries, but am not aware of such a problem w/ python2.5, > which you appear to be using. We often use a program called > dependency walker to track these problems down: > > http://www.dependencywalker.com/ > > Open the problematic file (it should be > C:\Python25\Lib\site-packages\matplotlib\_path.pyd) and report any > errors you find here; it should tell you which DLLs are missing. > Search the good and the bad boxes for these DLL filenames and see if > it is a difference in the boxes, eg do the good boxes have the DLL and > the bad boxes not, and if so maybe you can figure out why (different > version in the OS patch level?). I am really interested to know the > difference in the boxes because it may give us the critical clue as to > why some users report this problem and others do not see it. > > Also, on one of the bad boxes, could you try the new 0.99 release and > let me know if you have the same issue? > > I build the python2.5 installers with mingw; Christoph builds the > python2.6 installers with Visual Studio precisely because mingw is > broken on python2.6. If we can't banish this bug on 2.5 w/ mingw, I > may have to lean on his generosity and ask him to make a python2.5 > installer with Visual Studio as well. > > JDH > > PS: rereading your email, I see you are using 0.98.3. The first time > I read it, when I wrote the response above, I thought you were using > 0.98.5.3 -- the .3 at the end tricked me. The latter is fairly > recent, and came out 10 months after 0.98.3, and we did several things > to fix exactly this dll problem in interim. At a minimum, you need to > be testing and installing 0.98.5.3. This is a very stable, bug fix > release, suitable for use in the classroom. I can't guarantee you > won't hit the same problem, but at least you will be using a version > that *shouldn't* have it, though I am still interested in the results > of the dependency walker tests above, because I have wasted so much > time trying to fix these win32 installers. > Dear John, Many thanks for your detailed post with regard to how to troubleshoot this issue. The use of dependency walker allowed me to determine that affected systems were missing the Visual C/C++ shared runtime libraries - in particular, MSVCP71.DLL (the version of the runtime shipped with Microsoft Visual C++ .NET 2003) was missing on these systems. According to http://support.microsoft.com/default.aspx/kb/326922, installing the .NET 1.1 framework should - as a side-effect - also install this DLL. However, on Windows Server 2008 (the only box that I have direct access to in a faulted state) this DLL didn't seem to install when I installed the .NET 1.1 framework. (Aside: This could be because Explorer in Vista/2K8 appears to hide system files exceptionally well. Even after playing with the Windows Desktop Search syntax I couldn't get a match. Dropping to a cmd prompt and listing %systemroot%\system32 also didn't provide a match for the DLL.) On one of the student Windows XP machines, I copied the above DLL from a working XP SP3 install to "C:\Python25\Lib\site-packages\matplotlib" and confirmed that matplotlib then works correctly. Attempting the same trick on Server 2K8 didn't work, but this is probably to be expected (given that it's a major version change of Windows NT). Also, I don't think that M$ permit redistribution of the runtime by just copying a DLL across, so I have asked students to try installing the .NET framework 1.1. Thanks again for your help. Do you think that testing for the version of the Visual C redistributable is required during an install of matplotlib (and/or possibly at runtime). Thanks again for your assistance - this has been most appreciated. Regards, Patrick -- Dr Patrick Rynhart Linux Systems Administrator / Team Leader IT Support Group School of Engineering and Advanced Technology AgHort A Room 3.61 Massey University (Turitea Campus) NEW ZEALAND Phone +64 6 356 9099 extn 2444 |
From: Paul R. <Pau...@nr...> - 2009-08-25 20:41:02
|
Hi, I just installed matplotlib 0.99.0 and I see that this problem is still there. The command plot(a,ls='steps') is equivalent to plot(a,ls='steps-pre') and both cause the first value of the array to NOT be plotted. This is REALLY not what should happen when one plots an array with several values. It is fine if there is a custom option to make that behavior (like 'steps-pre'), but the default for ls='steps' or step(x,y) must be to have the first flat level at the level of the first entry (what the 'steps-post' does). The docstring now correctly describes the behavior, so that is good, but please please make the default "steps" be "steps-post". Thanks, -- Paul On Jul 19, 2009, at 9:35 AM, John Hunter wrote: > On Fri, Jul 17, 2009 at 5:15 PM, Paul Ray<Pau...@nr...> > wrote: >> >> >> Ryan Krauss-2 wrote: >>> >>> RTFM: >>> >>> plot(t,y, drawstyle='steps-post') >>> >>> >> >> Actually, 'steps-pre' (which is the default) and 'steps-post' seem >> to have >> swapped definitions. >> Here is what the docs say: >> *where*: [ 'pre' | 'post' | 'mid' ] >> If 'pre', the interval from x[i] to x[i+1] has level y[i] >> If 'post', that interval has level y[i+1] >> If 'mid', the jumps in *y* occur half-way between the >> *x*-values. >> >> In fact both the default behavior and what you get with steps-pre >> are what >> SHOULD happen with steps-post. And steps-post (as you point out) >> does what >> should be the default behavior and that of steps-pre. >> >> I have filed a bug report on this, since it is very important that >> this work >> as expected. As the original poster pointed out, this used to work >> correctly but recently seems to have gotten broken. > > > > I am looking first at the behavior of plot with the drawstyle property > set -- let's make sure this is correct before turning to the steps > command, which just uses plot with the drawstyle set -- here is my > test code > > import numpy as np > import matplotlib.pyplot as plt > > fig = plt.figure() > ax = fig.add_subplot(111) > > a = np.array([1,2,3,4,5]) > > styles = 'default' , 'steps' , 'steps-pre' , 'steps-mid' , 'steps- > post' > styles = 'steps' , 'steps-pre' > for ls in styles: > ax.plot(a, ls=ls, label=ls, lw=2) > > ax.legend(loc='upper left') > > plt.show() > > > pre causes the step to rise on the x[i], post causes it to rise on > x[i+1] and mid in the middle. This seems like the correct behavior. > So it does look like the docstring for 'step' is incorrect, and I've > changed it to read > > > *where*: [ 'pre' | 'post' | 'mid' ] > If 'pre', the interval from x[i] to x[i+1] has level y[i+1] > > If 'post', that interval has level y[i] > > If 'mid', the jumps in *y* occur half-way between the > > > JDH |