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

Showing results of 208

<< < 1 .. 4 5 6 7 8 9 > >> (Page 6 of 9)
From: Paul I. <piv...@gm...> - 2011年04月13日 16:52:46
Neal Becker, on 2011年04月13日 11:18, wrote:
> Suppose I'm generating multiple seperate plots. I'd like them auto-scaled, but 
> in the end want the same axis (so they can be visually compared). Any 
> suggestions? (semilogy, if that matters).
Hi Neal,
provided that the scales are different only in one dimension,
something like twinx() or twiny() would work to create new axes
on top of another one, sharing the one of the dimension, while
being independent in the other.
best,
-- 
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 
From: Paul I. <piv...@gm...> - 2011年04月13日 16:43:31
Hi Jerome,
jerome thircuir, on 2011年04月13日 10:15, wrote:
> hello, can someone give me a hint to get started.
we'll try our best, but I think we'll need more information from
you.
 
> context:
> i'm trying to use pythonxy and matplotlib
> i've got python 2.7 installed, and pythonxy
> i also have matplotlib installed (i know that because it runs from ipythonxy
> - the interactive console)
so 'import matplotlib' works in ipythonxy?
 
> eventually i'll need to be getting data from a database so that why i've
> chosen eclipse
are you talking about Eclipse IDE? I'm a little unclear about how
the IDE will help you get data out of a database, but maybe I
just don't know enough about eclipse.
> problem:
> 1. my import matplotlib shows an error (a bad start)
this error occurs when you import in Eclipse? What does the error
say?
> 2. i can't run my module
does your module import in plain python? what is the error
message?
 
best,
-- 
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 
From: Andrea C. <and...@gm...> - 2011年04月13日 16:15:27
I need to generate in some cases a subplot with two plots one on top of
the other, and in some other cases just one subplot.
So after some attempts I ended up with the ugliest code I've ever
written (maybe not) that you see below.
Is there a better way to do it?
I still didn't fully get how to get "rid" of the implicit global state
in matplotlib and use a more object/functional programming approach.
Anyway the second thing is that I'm not able to disable the autoscale, I
just would like to see the grid as it should be (geometrically).
It should just be matplotlib.pyplot.autoscale but in my version is not
present, isn't there another way?
Thanks a lot,
Andrea
--8<---------------cut here---------------start------------->8---
 def write_graph(self, output_file, title, show=False):
 def upper_graph():
 def draw_nodes(nlist, color):
 # this returns the list of all the patches, also from axes.patches
 nx.draw_networkx_nodes(self.graph, nodelist=nlist, pos=self.pos,
 node_color=color, node_size=700, alpha=0.6)
 draw_nodes(self.lands, 'red')
 draw_nodes(self.mobiles, 'green')
 simple_nodes = set(self.nodes) - set(self.lands + self.mobiles)
 draw_nodes(simple_nodes, 'blue')
 old_axes = plt.axis()
 sizes = old_axes[1] - old_axes[0], old_axes[3] - old_axes[2]
 offset = lambda x: int((float(x) / 10))
 new_axes = []
 for i in range(len(old_axes)):
 new_val = old_axes[i] + (((-1) ** (i + 1)) * offset(sizes[i % 2]))
 new_axes.append(new_val)
 plt.axis(new_axes)
 nx.draw_networkx_edges(self.graph, self.pos, edge_color='k', alpha=0.5)
 labels = dict((x, str(x)) for x in self.nodes)
 # for the landmarks also add its index
 for land in self.lands:
 labels[land] = "%d (%d)" % (land, self.lands.index(land))
 for recv in self.receivers:
 labels[recv] += " (R)"
 for send in self.senders:
 labels[send] += " (S)"
 nx.draw_networkx_labels(self.graph, self.pos, labels, font_size=8)
 plt.clf()
 plt.title(title)
 plt.xlabel("x")
 plt.ylabel("y")
 if show:
 upper_graph()
 plt.show()
 else:
 plt.subplot(211)
 upper_graph()
 plt.subplot(212)
 legend = self.coordinate_text()
 # remove useless ticks
 plt.xticks([])
 plt.yticks([])
 plt.text(0.05, 0, "\n".join(legend))
 plt.text(0.5, 0, str(self.event_buffer))
 plt.savefig(output_file)
--8<---------------cut here---------------end--------------->8---
From: Neal B. <ndb...@gm...> - 2011年04月13日 15:19:25
Suppose I'm generating multiple seperate plots. I'd like them auto-scaled, but 
in the end want the same axis (so they can be visually compared). Any 
suggestions? (semilogy, if that matters).
From: Wolfgang K. <wke...@go...> - 2011年04月13日 15:01:22
Dear all,
Is it possible to make a qt config dialogue that works in a similar 
fashion to the backend of matplotlib when using with ipython --pylab. It 
should be able to interact with plots (pressing buttons changing stuff 
in the plot) as well as not block ipython. Is that possible. Are there 
examples to do that?
Cheers
 Wolfgang
From: Tim Å. <qw...@ho...> - 2011年04月13日 13:59:27
Due to that my first question a couple of day back was a mess i thougth i could clear things up.
Is there any way to label the lines using linecollection. In plot there is label, example;
plot(x,y,label = "Hello")
But are there any way to do the same thing with linecollection?
If not, is there any eother asy way of creating labels on a line? 
Best regards,
Tim
 		 	 		 
From: jerome t. <jer...@gm...> - 2011年04月13日 09:16:04
hello, can someone give me a hint to get started.
context:
i'm trying to use pythonxy and matplotlib
i've got python 2.7 installed, and pythonxy
i also have matplotlib installed (i know that because it runs from ipythonxy
- the interactive console)
eventually i'll need to be getting data from a database so that why i've
chosen eclipse
problem:
1. my import matplotlib shows an error (a bad start)
2. i can't run my module
this is probably basic, can someone give me a pointer?
best,
From: Eric F. <ef...@ha...> - 2011年04月13日 01:11:11
On 04/12/2011 01:32 PM, Thomas Robitaille wrote:
> Hi,
>
> If I use interpolation='nearest' in an imshow command, when I try and save the image using savefig, the dpi= argument seems to have no effect. I have created a bug report on GitHub:
>
> https://github.com/matplotlib/matplotlib/issues/83
>
> Thanks for any help,
>
> Tom
>
Tom,
As a workaround you can use the pdf backend and then convert to eps if 
necessary using an external tool.
Eric
From: Thomas R. <tho...@gm...> - 2011年04月12日 23:31:42
Hi,
If I use interpolation='nearest' in an imshow command, when I try and save the image using savefig, the dpi= argument seems to have no effect. I have created a bug report on GitHub:
 https://github.com/matplotlib/matplotlib/issues/83
Thanks for any help,
Tom 
From: Jonathan S. <js...@cf...> - 2011年04月11日 18:31:14
Hi all:
I'm looking for a simple way to scale a color bar so it will be the same
height as the image. It seems to work automatically if the image is at
least as tall as it is wide, but when it is wider than tall it seems to
scale to the width rather than height. (Shouldn't the default behavior
be to scale to height if the colorbar is vertical and width if its
horizontal?) One approach that I found at one point was something like
this:
fig = plt.figure(figsize=(11,5))
cax = fig.add_axes([0.9,0.1,0.01,0.8]) # axes for colorbar
ax = plt.subplot(111)
im = ax.imshow(image)
fig.colorbar(im,cax=cax)
but even with this method it seems that tweaking the figsize and
add_axes arguments. I've also fiddled with the shrink and fraction
keywords and have managed to get good results, but it seems so ad hoc.
Is there a better way?
Jon
From: supawolo <luk...@br...> - 2011年04月11日 17:44:49
I can't determine whether this can be easily accomplished. Say I have x and y
data from which I construct a simple scatter plot. I would like to now add a
histogram of the differences between the individual elements of the x and y
vectors. Sounds easy enough, the only problem is that I would like to add
this differences histogram in the top right hand corner of the plot,
oriented diagonally, essentially straddling the unity line. I know how to
add marginal histograms to a scatter plot, but I cannot seem to find
information on how to rotate the histogram 45 degrees nor how to place it
appropriately. Could someone help me out with this? Any help would be much
appreciated.
Thanks!
-- 
View this message in context: http://old.nabble.com/diagonal-difference-histogram--tp31372386p31372386.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Oren G. <or...@fu...> - 2011年04月11日 16:09:34
I'm having a memory leakage using matplotlib 1.0.1 with wx 2.8.11.0, on
windows XP.
To reproduce, I used the sample from here:
http://matplotlib.sourceforge.net/examples/animation/dynamic_image_wxagg2.htmland
deleted most of the significant lines (see below). I only create a
canvas but I don't create any axes, nor plot any data.
The only thing I do is draw() on a timer event. This makes my process grow
about 6Mbyte per minute.
Is this reproduced in other environments? Any ideas on how to resolve this?
Thanks,
Oren
"""
Copyright (C) 2003-2005 Jeremy O'Donoghue and others
License: This work is licensed under the PSF. A copy should be included
with this source code, and is also available at
http://www.python.org/psf/license.html
"""
import sys, time, os, gc
import matplotlib
matplotlib.use('WXAgg')
from matplotlib import rcParams
import numpy as npy
import matplotlib.cm as cm
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
from matplotlib.backends.backend_wx import NavigationToolbar2Wx
from matplotlib.figure import Figure
from wx import *
TIMER_ID = NewId()
class PlotFigure(Frame):
 def __init__(self):
 Frame.__init__(self, None, -1, "Test embedded wxFigure")
 self.fig = Figure((1,1), 50, facecolor='.95')
 self.canvas = FigureCanvasWxAgg(self, -1, self.fig)
 # Now put all into a sizer
 sizer = wx.BoxSizer(wx.VERTICAL)
 # This way of adding to sizer allows resizing
 sizer.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW)
 self.SetSizer(sizer)
 self.Fit()
 self._price_ax = self.fig.add_subplot(111)
 wx.EVT_TIMER(self, TIMER_ID, self.onTimer)
 self.t = wx.Timer(self, TIMER_ID)
 self.t.Start(1000)
 def onTimer(self, evt):
 self.canvas.draw()
if __name__ == '__main__':
 app = PySimpleApp()
 frame = PlotFigure()
 # Initialise the timer - wxPython requires this to be connected to
 # the receiving event handler
 t = Timer(frame, TIMER_ID)
 t.Start(100)
 frame.Show()
 app.MainLoop()
From: Tom D. <tdi...@ph...> - 2011年04月11日 15:53:22
Attachments: qt4_keycodes.txt
The arrow keys were not being correctly detected in the Qt4 backend of 
the matplotlib gui code, so I went in and hooked up keycodes for them.
I haven't submitted patches before, but I thought this was worth passing 
on, so I have attached it. Is this something worth submitting? How 
would I go about doing that?
Tom
From: Tim Å. <qw...@ho...> - 2011年04月11日 14:13:56
Hello!
I have written a temprature logger using mathplotlib, i take in a list of multiple lines and print them out with Linecollection, i also supply a list of colors. 
Now to the the question, what is the best way (function) to explain to the user what line in the graph that correspond to each temprature node.
What im looking for is some sort of function that make a list in the facion;
Green - Node1
 		 	 		 
From: Martin S. <sp...@da...> - 2011年04月11日 13:31:43
Hey,
Thank you! You solved my problem!
Cheers
Martin
2011年4月11日 Sebastian Berg <seb...@si...>:
> Hey,
>
> not sure about which values are good to use (there is an example in the
> gallery about it), but do the first plot command for example with
> zorder=1 keyword argument, and the errorbar with zorder=2, and voila you
> got what you want.
>
> Regards,
>
> Sebastian
>
>
> On Mon, 2011年04月11日 at 14:49 +0200, Martin Sparre wrote:
>> Dear Matplotlib-users,
>>
>> I am trying to plot some data as well as an errorbar. The problem is
>> that the errorbar stays behind the data even though plt.errorbar(...)
>> comes after plt.plot(....) in my code. Here is a simple code that
>> produces the problem:
>>
>> http://dark-cosmology.dk/~sparre/example.py
>>
>> And here is a png-file showing the errorbar behind the data.
>> http://dark-cosmology.dk/~sparre/image.png
>>
>> Can anyone help me with getting the errorbar in front of the blue
>> curve? - it would make me very happy!
>>
>> I am using Matplotlib version 1.0.1 on Ubuntu 10.10 (Python 2.6.6).
>>
>> Best regards,
>> Martin Sp.
>>
>> ------------------------------------------------------------------------------
>> Xperia(TM) PLAY
>> It's a major breakthrough. An authentic gaming
>> smartphone on the nation's most reliable network.
>> And it wants your games.
>> http://p.sf.net/sfu/verizon-sfdev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Sebastian B. <seb...@si...> - 2011年04月11日 12:57:41
Hey,
not sure about which values are good to use (there is an example in the
gallery about it), but do the first plot command for example with
zorder=1 keyword argument, and the errorbar with zorder=2, and voila you
got what you want.
Regards,
Sebastian
On Mon, 2011年04月11日 at 14:49 +0200, Martin Sparre wrote:
> Dear Matplotlib-users,
> 
> I am trying to plot some data as well as an errorbar. The problem is
> that the errorbar stays behind the data even though plt.errorbar(...)
> comes after plt.plot(....) in my code. Here is a simple code that
> produces the problem:
> 
> http://dark-cosmology.dk/~sparre/example.py
> 
> And here is a png-file showing the errorbar behind the data.
> http://dark-cosmology.dk/~sparre/image.png
> 
> Can anyone help me with getting the errorbar in front of the blue
> curve? - it would make me very happy!
> 
> I am using Matplotlib version 1.0.1 on Ubuntu 10.10 (Python 2.6.6).
> 
> Best regards,
> Martin Sp.
> 
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Martin S. <sp...@da...> - 2011年04月11日 12:49:47
Dear Matplotlib-users,
I am trying to plot some data as well as an errorbar. The problem is
that the errorbar stays behind the data even though plt.errorbar(...)
comes after plt.plot(....) in my code. Here is a simple code that
produces the problem:
http://dark-cosmology.dk/~sparre/example.py
And here is a png-file showing the errorbar behind the data.
http://dark-cosmology.dk/~sparre/image.png
Can anyone help me with getting the errorbar in front of the blue
curve? - it would make me very happy!
I am using Matplotlib version 1.0.1 on Ubuntu 10.10 (Python 2.6.6).
Best regards,
Martin Sp.
From: Markus B. <mar...@gm...> - 2011年04月11日 03:15:14
Hi Paul,
Thanks a lot. That was exactly what I was looking for!
Best regards,
Markus
On Thu, Apr 7, 2011 at 1:14 AM, Paul Ivanov <piv...@gm...> wrote:
> Markus Baden, on 2011年04月06日 10:18, wrote:
> > Hi,
> >
> > I draw four subplots that touch each other. Thus the "middle cross" of
> the
> > frame is drawn twice and appears to be thicker then the "outer
> rectangle". I
> > came across an old post for an custom Axes that would allow to only draw
> > part of the frame
> >
> >
> http://www.mail-archive.com/mat...@li.../msg10242.html
> >
> > However, when I run the example provided I get an "can't set attribute
> > error" (see traceback below). I use Python 2.7.1 |EPD 7.0-1 (32-bit) on
> Mac
> > OS 10.5.8, which includes matplotlib version 1.0.1.
> >
> > Is there a fix to get the custom class running again, or is there an
> > alternative way to achieve what I intend?
>
> Hi Markus,
>
> I didn't look at that code but I think the alternative you're
> looking for is
>
> ax.spines['right'].set_visible(False)
> ax.spines['bottom'].set_visible(False)
>
> where you use the appropriate locations you want changed for the
> different subplots axes.
>
> If you're going to have a lot of subplots, you can simplify the
> logic by first setting all spines to being invisible, and then
> using ax.is_first_col(), is_first_row() and the corresponding
> is_last_* methods to set the appropriate spines back to visible.
>
> Like this:
>
> #show only the outside spines
> for ax in all_axes:
> for sp in ax.spines.values():
> sp.set_visible(False)
> if ax.is_first_row():
> ax.spines['top'].set_visible(True)
> if ax.is_last_row():
> ax.spines['bottom'].set_visible(True)
> if ax.is_first_col():
> ax.spines['left'].set_visible(True)
> if ax.is_last_col():
> ax.spines['right'].set_visible(True)
>
> best,
> --
> Paul Ivanov
> 314 address only used for lists, off-list direct email at:
> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk2cn4cACgkQe+cmRQ8+KPfCmACfTDkYFuGAz3zddfjIp963M3UK
> Ve0AnRcvhQYcUnq/u8EU3Ap9fIkUUyLv
> =mJHV
> -----END PGP SIGNATURE-----
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: fireproofboots <dyl...@um...> - 2011年04月10日 18:51:26
Hey,
I'm using matplot lib to make surface and contour plots of different
functions based on the set of data. (so I have a surface plot thats
basically f1(x,y) and a contour thats f2(x,y)) I want to color the surface
plot with the exact colors that are shown in the contour plot. (The surface
is a structure shape and the contour plot is the stress along the shape, I
want to plot the surface of the shape with the colors representing the
stress) I'm not sure how I can paste the colors from the contour plot onto
the surface. If anyone has anything that can help I'd really appreciate it,
thanks!
-- 
View this message in context: http://old.nabble.com/colormap-extractions-tp31365189p31365189.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Alan G I. <ai...@am...> - 2011年04月10日 15:06:11
What is the status of tick setting in Axes3D?
I see there were some issues possibly to be fixed by 1.0.1,
but I'm running 1.0.1 and cannot properly set my ticks.
Thanks,
Alan Isaac
From: Alan G I. <ai...@am...> - 2011年04月10日 14:44:31
If you look at the 3d scatter plot example in the tutorial
http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html#scatter-plots
you will see exactly the labels problem I am running into.
Can it be fixed? At a minimum, what is the right way to prevent the labels from
overlapping the ticks, and might the defaults be changed to avoid this?
Thanks,
Alan Isaac
From: Michiel de H. <mjl...@ya...> - 2011年04月09日 14:08:32
--- On Mon, 3/28/11, Chris Fonnesbeck <fon...@gm...> wrote:
> From: Chris Fonnesbeck <fon...@gm...>
> Subject: [Matplotlib-users] MacOSX backend hangs
> To: mat...@li...
> Date: Monday, March 28, 2011, 1:41 PM
> I'm running a recent build from
> source (last week) on OSX 10.6.6 and the Python 2.6.1 that
> ships with the OS.
Is this a framework build of Python? On older versions of OSX, the Python that ships with the OS is not a framework build. Python will then not interact properly with the window manager.
--Michiel.
> When I use the macosx backend, any plot
> that I generate results in a window that hangs. The Python
> dock icon bounces for awhile, then when it stops, the
> spinning beach ball appears and I am unable to interact with
> the window. I can, however, add plots to the window and
> update its contents with show(). This behaviour does not
> occur with other backends (e.g. TkAgg). I have tried
> switching interactive mode off in matplotlibrc, but this
> does not fix the problem.
> 
> Thanks in advance for any ideas.
> 
> 
> 
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Paul I. <piv...@gm...> - 2011年04月09日 00:58:37
Hi Matt,
Matt Funk, on 2011年04月08日 14:56, wrote:
> mpl.__version__ = 0.99.3
ah - this would do it - that axis parameter was added by Eric
Firing on 2010年01月03日 - but it didn't go into the 0.99 series - it
went straight to trunk - so you'll have to get at least
matplotlib 1.0 to gain that functionality.
best,
-- 
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 
From: Eric F. <ef...@ha...> - 2011年04月08日 23:51:32
On 04/08/2011 10:56 AM, Matt Funk wrote:
> Hi Paul,
>
> thanks for the response. Emmhh, i am not sure what's going on since what you
> are saying matches what's listed at
> http://matplotlib.sourceforge.net/users/customizing.html. The problem is that
> when i try it I get a key error, correspondingly, when i print rcParams i
> cannot find axes.color_cycle key:
It is quite new, so your mpl version is too old to have it.
Eric
>
> So printing rcParams gives:
> print mpl.rcParams
> {'figure.subplot.right': 0.90000000000000002, 'mathtext.cal': 'cursive',
> 'font.fantasy': ['Comic Sans MS', 'Chicago', 'Charcoal', 'ImpactWestern',
> 'fantasy'], 'xtick.minor.pad': 4, 'tk.pythoninspect': False, 'image.aspect':
> 'equal', 'font.cursive': ['Apple Chancery', 'Textile', 'Zapf Chancery',
> 'Sand', 'cursive'], 'figure.subplot.hspace': 0.20000000000000001,
> 'xtick.direction': 'out', 'axes.facecolor': 'w', 'mathtext.fontset': 'cm',
> 'ytick.direction': 'out', 'svg.image_inline': True, 'lines.markersize': 10.0,
> 'figure.dpi': 80, 'text.usetex': True, 'text.fontangle': 'normal',
> 'patch.edgecolor': 'k', 'legend.labelspacing': 0.5, 'ps.useafm': False,
> 'mathtext.bf': 'serif:bold', 'lines.solid_joinstyle': 'round',
> 'font.monospace': ['Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Andale
> Mono', 'Nimbus Mono L', 'Courier New', 'Courier', 'Fixed', 'Terminal',
> 'monospace'], 'xtick.minor.size': 2, 'axes.formatter.limits': [-7, 7],
> 'figure.subplot.wspace': 0.20000000000000001, 'savefig.edgecolor': 'w',
> 'text.fontvariant': 'normal', 'image.cmap': 'jet', 'axes.edgecolor': 'k',
> 'tk.window_focus': False, 'image.origin': 'upper', 'text.fontsize': 'medium',
> 'font.serif': ['Bitstream Vera Serif', 'DejaVu Serif', 'New Century
> Schoolbook', 'Century Schoolbook L', 'Utopia', 'ITC Bookman', 'Bookman',
> 'Nimbus Roman No9 L', 'Times New Roman', 'Times', 'Palatino', 'Charter',
> 'serif'], 'savefig.facecolor': 'w', 'maskedarray': 'obsolete',
> 'ytick.minor.size': 2, 'numerix': 'obsolete', 'font.stretch': 'normal',
> 'text.dvipnghack': None, 'ytick.color': 'k', 'lines.linestyle': '-',
> 'xtick.color': 'k', 'xtick.major.pad': 4, 'text.fontweight': 'normal',
> 'patch.facecolor': 'b', 'figure.figsize': [8.0, 6.0], 'axes.linewidth': 1.0,
> 'legend.handletextpad': 0.80000000000000004, 'mathtext.fallback_to_cm': True,
> 'lines.linewidth': 1.0, 'savefig.dpi': 100, 'verbose.fileo': 'sys.stdout',
> 'svg.image_noscale': False, 'docstring.hardcopy': False, 'font.size': 24.0,
> 'ps.fonttype': 3, 'path.simplify': True, 'polaraxes.grid': True, 'toolbar':
> 'toolbar2', 'pdf.compression': 6, 'grid.linewidth': 0.5, 'figure.autolayout':
> False, 'figure.facecolor': '0.75', 'ps.usedistiller': False, 'legend.isaxes':
> True, 'figure.edgecolor': 'w', 'mathtext.tt': 'monospace',
> 'contour.negative_linestyle': 'dashed', 'image.interpolation': 'bilinear',
> 'lines.markeredgewidth': 1.5, 'axes3d.grid': True, 'lines.marker': 'None',
> 'legend.shadow': False, 'axes.titlesize': 24.0, 'backend': 'TkAgg',
> 'xtick.major.size': 4, 'legend.fontsize': 24.0, 'lines.solid_capstyle':
> 'projecting', 'mathtext.it': 'serif:italic', 'font.variant': 'normal',
> 'xtick.labelsize': 'medium', 'axes.unicode_minus': True, 'ps.distiller.res':
> 6000, 'pdf.fonttype': 3, 'patch.linewidth': 1.0, 'pdf.inheritcolor': False,
> 'lines.dash_capstyle': 'butt', 'lines.color': 'b', 'text.latex.preview':
> False, 'figure.subplot.top': 0.90000000000000002, 'pdf.use14corefonts': False,
> 'legend.markerscale': 1.0, 'patch.antialiased': True, 'font.style': 'normal',
> 'backend_fallback': True, 'legend.fancybox': True, 'grid.linestyle': ':',
> 'axes.labelcolor': 'k', 'text.color': 'k', 'mathtext.rm': 'serif',
> 'legend.loc': 'upper right', 'interactive': False, 'cairo.format': 'png',
> 'savefig.orientation': 'portrait', 'axes.axisbelow': False, 'ytick.major.size':
> 4, 'axes.grid': False, 'plugins.directory': '.matplotlib_plugins',
> 'grid.color': 'k', 'timezone': 'UTC', 'ytick.major.pad': 4,
> 'legend.borderpad': 0.40000000000000002, 'lines.dash_joinstyle': 'round',
> 'datapath': '/usr/share/matplotlib/mpl-data', 'lines.antialiased': True,
> 'text.latex.unicode': False, 'image.lut': 256, 'units': False,
> 'figure.subplot.bottom': 0.10000000000000001, 'text.latex.preamble': [''],
> 'legend.numpoints': 2, 'legend.handlelength': 2.0, 'font.sans-serif':
> ['Arial'], 'font.family': 'sans-serif', 'axes.labelsize': 24.0,
> 'ytick.minor.pad': 4, 'legend.borderaxespad': 0.5, 'mathtext.sf': 'sans\\-
> serif', 'axes.hold': True, 'verbose.level': 'silent', 'mathtext.default':
> 'it', 'figure.subplot.left': 0.125, 'legend.columnspacing': 2.0,
> 'text.fontstyle': 'normal', 'font.weight': 'normal', 'image.resample': False,
> 'agg.path.chunksize': 0, 'path.simplify_threshold': 0.1111111111111111,
> 'ytick.labelsize': 'medium', 'ps.papersize': 'letter', 'svg.embed_char_paths':
> True}
>
> (sorry for the long post).
> Anything obvious that i am doing wrong? I am using:
> Python 2.6.6
> mpl.__version__ = 0.99.3
>
> thanks
> matt
>
>
> On Thursday, April 07, 2011, Paul Ivanov wrote:
>> Matt Funk, on 2011年04月07日 16:52, wrote:
>>> Hi,
>>> i am farily new to matplotlib so my question might be fairly basic. I
>>> would like to be able to set certain default values at the beginning of
>>> my script. The way i did this with the other values is via changing the
>>> value stored in rcparams. So something like:
>>> import matplotlib.pyplot as mpl
>>> mpl.rcParams['lines.markersize'] = 20
>>>
>>> But i would like to set the markerfacecolor in such a way but it is not
>>> included in rcParams. I would really like to avoid setting it in each
>>> individual plot call.
>>>
>>> Is there a way to change the default at the start of the script?
>>
>> Hi Matt,
>>
>> this depends on how you're plotting.
>>
>> If you're just using plt.plot - it defers to cycling through the
>> rcParams['axes.color_cycle'] - so just set that to one value
>> before starting your plots..
>>
>> old_color_cycle = rcParams['axes.color_cycle']
>> rcParams['axes.color_cycle'] = 'purple' # cue Gogol Bordello
>> plt.figure()
>> ax = plt.subplot(111)
>>
>> ax.plot(range(10),'o', markersize=40)
>> ax.plot(np.random.rand(10),'o', markersize=40)
>> ax.plot(np.random.rand(10)*10,'o', markersize=40)
>>
>> # restore color_cycle just for this axes
>> ax._get_lines.set_color_cycle(old_color_cycle)
>> ax.plot(range(20,30), range(10),'o', markersize=40)
>> ax.plot(range(20,30), np.random.rand(10),'o', markersize=40)
>> ax.plot(range(20,30), np.random.rand(10)*10,'o', markersize=40)
>>
>> # restore old cycle for all new axes
>> rcParams['axes.color_cycle'] = old_color_cycle
>> --
>>
>> If, on the other hand, you're using scatter, there isn't
>> currently a way of doing the same, since scatter just uses 'b' as
>> the default parameter for color.
>>
>> This should probably be changed to act the same way plot does,
>> but that isn't currently implemented. This would be a good first
>> patch for a newcomer -- and would make matplotlib more consistent.
>>
>> best,
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Matt F. <ma...@nm...> - 2011年04月08日 20:59:48
Hi Paul,
thanks for the response. Emmhh, i am not sure what's going on since what you 
are saying matches what's listed at 
http://matplotlib.sourceforge.net/users/customizing.html. The problem is that 
when i try it I get a key error, correspondingly, when i print rcParams i 
cannot find axes.color_cycle key:
So printing rcParams gives:
print mpl.rcParams
{'figure.subplot.right': 0.90000000000000002, 'mathtext.cal': 'cursive', 
'font.fantasy': ['Comic Sans MS', 'Chicago', 'Charcoal', 'ImpactWestern', 
'fantasy'], 'xtick.minor.pad': 4, 'tk.pythoninspect': False, 'image.aspect': 
'equal', 'font.cursive': ['Apple Chancery', 'Textile', 'Zapf Chancery', 
'Sand', 'cursive'], 'figure.subplot.hspace': 0.20000000000000001, 
'xtick.direction': 'out', 'axes.facecolor': 'w', 'mathtext.fontset': 'cm', 
'ytick.direction': 'out', 'svg.image_inline': True, 'lines.markersize': 10.0, 
'figure.dpi': 80, 'text.usetex': True, 'text.fontangle': 'normal', 
'patch.edgecolor': 'k', 'legend.labelspacing': 0.5, 'ps.useafm': False, 
'mathtext.bf': 'serif:bold', 'lines.solid_joinstyle': 'round', 
'font.monospace': ['Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Andale 
Mono', 'Nimbus Mono L', 'Courier New', 'Courier', 'Fixed', 'Terminal', 
'monospace'], 'xtick.minor.size': 2, 'axes.formatter.limits': [-7, 7], 
'figure.subplot.wspace': 0.20000000000000001, 'savefig.edgecolor': 'w', 
'text.fontvariant': 'normal', 'image.cmap': 'jet', 'axes.edgecolor': 'k', 
'tk.window_focus': False, 'image.origin': 'upper', 'text.fontsize': 'medium', 
'font.serif': ['Bitstream Vera Serif', 'DejaVu Serif', 'New Century 
Schoolbook', 'Century Schoolbook L', 'Utopia', 'ITC Bookman', 'Bookman', 
'Nimbus Roman No9 L', 'Times New Roman', 'Times', 'Palatino', 'Charter', 
'serif'], 'savefig.facecolor': 'w', 'maskedarray': 'obsolete', 
'ytick.minor.size': 2, 'numerix': 'obsolete', 'font.stretch': 'normal', 
'text.dvipnghack': None, 'ytick.color': 'k', 'lines.linestyle': '-', 
'xtick.color': 'k', 'xtick.major.pad': 4, 'text.fontweight': 'normal', 
'patch.facecolor': 'b', 'figure.figsize': [8.0, 6.0], 'axes.linewidth': 1.0, 
'legend.handletextpad': 0.80000000000000004, 'mathtext.fallback_to_cm': True, 
'lines.linewidth': 1.0, 'savefig.dpi': 100, 'verbose.fileo': 'sys.stdout', 
'svg.image_noscale': False, 'docstring.hardcopy': False, 'font.size': 24.0, 
'ps.fonttype': 3, 'path.simplify': True, 'polaraxes.grid': True, 'toolbar': 
'toolbar2', 'pdf.compression': 6, 'grid.linewidth': 0.5, 'figure.autolayout': 
False, 'figure.facecolor': '0.75', 'ps.usedistiller': False, 'legend.isaxes': 
True, 'figure.edgecolor': 'w', 'mathtext.tt': 'monospace', 
'contour.negative_linestyle': 'dashed', 'image.interpolation': 'bilinear', 
'lines.markeredgewidth': 1.5, 'axes3d.grid': True, 'lines.marker': 'None', 
'legend.shadow': False, 'axes.titlesize': 24.0, 'backend': 'TkAgg', 
'xtick.major.size': 4, 'legend.fontsize': 24.0, 'lines.solid_capstyle': 
'projecting', 'mathtext.it': 'serif:italic', 'font.variant': 'normal', 
'xtick.labelsize': 'medium', 'axes.unicode_minus': True, 'ps.distiller.res': 
6000, 'pdf.fonttype': 3, 'patch.linewidth': 1.0, 'pdf.inheritcolor': False, 
'lines.dash_capstyle': 'butt', 'lines.color': 'b', 'text.latex.preview': 
False, 'figure.subplot.top': 0.90000000000000002, 'pdf.use14corefonts': False, 
'legend.markerscale': 1.0, 'patch.antialiased': True, 'font.style': 'normal', 
'backend_fallback': True, 'legend.fancybox': True, 'grid.linestyle': ':', 
'axes.labelcolor': 'k', 'text.color': 'k', 'mathtext.rm': 'serif', 
'legend.loc': 'upper right', 'interactive': False, 'cairo.format': 'png', 
'savefig.orientation': 'portrait', 'axes.axisbelow': False, 'ytick.major.size': 
4, 'axes.grid': False, 'plugins.directory': '.matplotlib_plugins', 
'grid.color': 'k', 'timezone': 'UTC', 'ytick.major.pad': 4, 
'legend.borderpad': 0.40000000000000002, 'lines.dash_joinstyle': 'round', 
'datapath': '/usr/share/matplotlib/mpl-data', 'lines.antialiased': True, 
'text.latex.unicode': False, 'image.lut': 256, 'units': False, 
'figure.subplot.bottom': 0.10000000000000001, 'text.latex.preamble': [''], 
'legend.numpoints': 2, 'legend.handlelength': 2.0, 'font.sans-serif': 
['Arial'], 'font.family': 'sans-serif', 'axes.labelsize': 24.0, 
'ytick.minor.pad': 4, 'legend.borderaxespad': 0.5, 'mathtext.sf': 'sans\\-
serif', 'axes.hold': True, 'verbose.level': 'silent', 'mathtext.default': 
'it', 'figure.subplot.left': 0.125, 'legend.columnspacing': 2.0, 
'text.fontstyle': 'normal', 'font.weight': 'normal', 'image.resample': False, 
'agg.path.chunksize': 0, 'path.simplify_threshold': 0.1111111111111111, 
'ytick.labelsize': 'medium', 'ps.papersize': 'letter', 'svg.embed_char_paths': 
True}
(sorry for the long post).
Anything obvious that i am doing wrong? I am using:
Python 2.6.6
mpl.__version__ = 0.99.3
thanks
matt
On Thursday, April 07, 2011, Paul Ivanov wrote:
> Matt Funk, on 2011年04月07日 16:52, wrote:
> > Hi,
> > i am farily new to matplotlib so my question might be fairly basic. I
> > would like to be able to set certain default values at the beginning of
> > my script. The way i did this with the other values is via changing the
> > value stored in rcparams. So something like:
> > import matplotlib.pyplot as mpl
> > mpl.rcParams['lines.markersize'] = 20
> > 
> > But i would like to set the markerfacecolor in such a way but it is not
> > included in rcParams. I would really like to avoid setting it in each
> > individual plot call.
> > 
> > Is there a way to change the default at the start of the script?
> 
> Hi Matt,
> 
> this depends on how you're plotting.
> 
> If you're just using plt.plot - it defers to cycling through the
> rcParams['axes.color_cycle'] - so just set that to one value
> before starting your plots..
> 
> old_color_cycle = rcParams['axes.color_cycle']
> rcParams['axes.color_cycle'] = 'purple' # cue Gogol Bordello
> plt.figure()
> ax = plt.subplot(111)
> 
> ax.plot(range(10),'o', markersize=40)
> ax.plot(np.random.rand(10),'o', markersize=40)
> ax.plot(np.random.rand(10)*10,'o', markersize=40)
> 
> # restore color_cycle just for this axes
> ax._get_lines.set_color_cycle(old_color_cycle)
> ax.plot(range(20,30), range(10),'o', markersize=40)
> ax.plot(range(20,30), np.random.rand(10),'o', markersize=40)
> ax.plot(range(20,30), np.random.rand(10)*10,'o', markersize=40)
> 
> # restore old cycle for all new axes
> rcParams['axes.color_cycle'] = old_color_cycle
> --
> 
> If, on the other hand, you're using scatter, there isn't
> currently a way of doing the same, since scatter just uses 'b' as
> the default parameter for color.
> 
> This should probably be changed to act the same way plot does,
> but that isn't currently implemented. This would be a good first
> patch for a newcomer -- and would make matplotlib more consistent.
> 
> best,
7 messages has been excluded from this view by a project administrator.

Showing results of 208

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