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



Showing 11 results of 11

From: Andrew S. <str...@as...> - 2006年05月26日 18:42:24
I use the following on Debian Sarge linux (both x86_64 and i686, 
although I hope/think it would work on any architecture and hopefully 
any linux distro):
"ffmpeg -hq -b 8000 -f mpeg2video -r 30 -i frame%03d.png movie.mpeg"
You may now skip the rest of this email, which is an uncalled-for 
venting-of-frustration.
Unfortunately, it seems bazillions of software companies think they can 
make bazillions of dollars by releasing yet another codec encumbered by 
more-or-less (but usually more) restrictive licensing conditions, 
leaving only lowest-common denominator codecs available for those of us 
who prefer to work without such restrictions. I sought long and hard to 
do something better than the above, but I can say this about the above 
command:
 * it produces movies that play in Windows (including PowerPoint, which 
isn't a given, even if it plays in Windows Media Player -- c'mon 
Microsoft, this is 2006, we should be able to play movies in our 
presentations), Mac OS X, and linux (Debian sarge, amd64 and i386, at least)
 * it seems to work with a standard Debian setup, and doesn't require 
using DLLs imported from some Windows system to to the encoding
 * it seems very fragile -- changing the frame rate or the codec usually 
breaks one of the above points
 * mpeg2 is probably also burdened by some licensing restrictions which 
I'm unaware of
 * on some Windows boxes/programs, white backgrounds get displayed as 
gray for some reason
Wishing that in 2006 we as a human race could come up with a better, 
open video format, but willing to accept even minor improvements to the 
above script,
Andrew
Alan G Isaac wrote:
>How are you turning your PNGs into an animation?
>
>Thanks,
>Alan Isaac
>
>PS I know about
>http://www.pymolwiki.org/index.php/Category%3ASoftware_Movies
> 
>
From: Robert K. <rob...@gm...> - 2006年05月26日 18:40:16
hu...@ya... wrote:
> Hi,
> 
> just a small question about histogram. I saw that the result of the hist 
> function from pylab and histogram from numpy+scipy can be slightly different 
> when the array is big and with real data (not integer). I'll probably told 
> something stupid but perhaps that will be good to have consistancies between 
> both function, won't it?
There are lots of different, equally valid ways to construct a histogram.
pylab.hist() and scipy.stats.histogram() probably use different algorithms. It's
probably not worth changing one just to match the other. Much better would be to
provide a broader interface to let the user twiddle the various knobs he would
like to twiddle. I believe David Huard posted an improved histogram class that
implements a number of useful features.
-- 
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
 -- Umberto Eco
From: <hu...@ya...> - 2006年05月26日 18:27:11
Attachments: data.dat
Here a sample:
the data are in the file data.dat join. 
In [1]: import pylab
In [2]: import scipy
In [3]: import scipy.stats
In [4]: data1,data2=pylab.load('data.dat',unpack=True)
In [5]: pylab.hist(data1,20)
(Out[5]:
array([ 4, 6, 23, 52, 90, 128, 184, 244, 283, 293, 297, 330, 321,
 231, 188, 140, 94, 48, 29, 15]),
 array([ 0.00998046, 0.01054459, 0.01110872, 0.01167285, 0.01223698,
 0.01280111, 0.01336524, 0.01392937, 0.0144935 , 0.01505763,
 0.01562176, 0.01618589, 0.01675002, 0.01731415, 0.01787828,
 0.01844241, 0.01900654, 0.01957067, 0.0201348 , 0.02069894]),
 <a list of 20 Patch objects>)
In [6]: scipy.stats.histogram(data1,20)
Out[6]:
(array([ 1, 7, 17, 43, 75, 126, 185, 248, 303, 302, 314, 353, 315,
 241, 178, 145, 70, 51, 20, 6]),
 0.0096835454084847374,
 0.00059382155039052636,
 0)
> humufr> Hi, just a small question about histogram. I saw that the
> humufr> result of the hist function from pylab and histogram from
> humufr> numpy+scipy can be slightly different when the array is
> humufr> big and with real data (not integer). I'll probably told
> humufr> something stupid but perhaps that will be good to have
> humufr> consistancies between both function, won't it?
>
> Complete example, please...
>
> JDH
>
>
> -------------------------------------------------------
> All the advantages of Linux Managed Hosting--Without the Cost and Risk!
> Fully trained technicians. The highest number of Red Hat certifications in
> the hosting industry. Fanatical Support. Click to learn more
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Allan Noriel Estrella wrote:
> can you give the url of wxmpl and Mplot, i had a hard time googling for 
> them
That's rare, but I had trouble too, some of the google links are dead, 
but I found this for wxmpl:
http://agni.phys.iit.edu/~kmcivor/wxmpl/
and this (just the files) for Mplot:
http://cars9.uchicago.edu/~newville/Python/MPlot/
If you search this list, you'll see discussion of the differences 
between them, but I'll try this short synopsis (Kevin and Matt, please 
correct as needed)
wxmpl is designed to make it a bit easier to embed matplotlib in a a 
wxPython app. Once you've got a PlotPanel (or PlotFrame), you do your 
plotting with the matplotlib OO API (and some of pylab)
Mplot is designed to provide a plotting window that the end-user of the 
application can interact with, doing at least some manipulation of the 
plot. It provides and alternative API for plotting that is easy to use, 
but not feature-complete.
Note that I haven't Mplot, so I may have that a bit wrong.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: John H. <jdh...@ac...> - 2006年05月26日 16:23:16
>>>>> "humufr" == humufr <hu...@ya...> writes:
 humufr> Hi, just a small question about histogram. I saw that the
 humufr> result of the hist function from pylab and histogram from
 humufr> numpy+scipy can be slightly different when the array is
 humufr> big and with real data (not integer). I'll probably told
 humufr> something stupid but perhaps that will be good to have
 humufr> consistancies between both function, won't it?
Complete example, please...
JDH
From: <hu...@ya...> - 2006年05月26日 16:19:04
Hi,
just a small question about histogram. I saw that the result of the hist 
function from pylab and histogram from numpy+scipy can be slightly different 
when the array is big and with real data (not integer). I'll probably told 
something stupid but perhaps that will be good to have consistancies between 
both function, won't it?
N.
From: Alan G I. <ai...@am...> - 2006年05月26日 16:18:53
How are you turning your PNGs into an animation?
Thanks,
Alan Isaac
PS I know about
http://www.pymolwiki.org/index.php/Category%3ASoftware_Movies
Bryan Cole wrote:
> To accomplish similar goals, I embed a matplotlib panel (including
> toolbar) in a wxPython application 
If you do this, be sure to take a look at wxmpl and/or Mplot , they make 
it a bit easier to embed MPL in wxPython.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Alan G I. <ai...@am...> - 2006年05月26日 15:00:27
On 2006年5月26日, Giandomenico Sica apparently wrote: 
> Insert a number: 4 
> Couples: [[4, 3], [4, 2], [4, 1], [3, 2], [3, 1], [2, 1]] 
> What I'd like to do is drawing with Matplotlib a graph having as nodes 
> 1, 2, 3, 4 and as edges among the nodes the above couples. 
n = input("Insert a number" )
a = reversed(range(1,n+1))
coppie = [[i,j] for i in a for j in range(1,i)]
print coppie
G = NX.Graph()
for edge in coppie:
	G.add_edge(*edge)
print G.edges()
NX.draw(G)
pylab.savefig(r'c:\temp\temp.eps')
hth,
Alan Isaac
From: Giandomenico S. <gia...@po...> - 2006年05月26日 11:02:47
Hello,
I'm new in Matplotlib and am writing in order to ask a help.
I've developed a little software with Python that, by inserting a
number, calculate a list of couples.
Example
Insert a number: 4
Couples: [[4, 3], [4, 2], [4, 1], [3, 2], [3, 1], [2, 1]]
What I'd like to do is drawing with Matplotlib a graph having as nodes
1, 2, 3, 4 and as edges among the nodes the above couples. (sample
drawing: https://networkx.lanl.gov/)
Can you help me to make this operation please?
My code at the present is the following one.
n = input("Insert a number" )
a = range(n)
p = 0
q = 1
coppie = []
coppia = []
while len(a) - p != 1:
	coppia.append(len(a) - p)
	coppia.append(len(a) - p - q)
	coppie.append(coppia)
	coppia = []
	if len(a) - p - q != 0:
		q = q + 1
	if len(a) - p - q == 0:
		p = p + 1
		q = 1
print coppie
I suppose it is quite easy but in spite of this have some difficulty.
Really many thanks for the help!
Best,
Nico
From: Michael M. F. <mf...@nt...> - 2006年05月26日 02:15:10
I am having some problems with the axes frame being clipped.
Consider the following:
from pylab import *
fill([0,1,1,0],[0,0,1,1],facecolor=(1,1,1),edgecolor=(1,1,1))
axis([-1,1,-1,1])
gca().get_frame().set_linewidth(20)
show()
I have made the frame thick to emphasize the problem: When I plot
things, they overwrite part of the frame which looks bad. What is the
simplest/best way to avoid this?
I would like the axes frame to be drawn only outside of the actual
plot area, but I cannot figure out how to achieve this. (It seems
like this might also be desirable default behaviour...). Otherwise,
I would settle for the frame being drawn over top of the plot so that
it is smooth.
A crude hack would be to plot a blank rectangle. It should also be
possible to use clipping somehow, but I do not have much experience
with that.
Is there a simple solution?
Thanks for any help,
Michael

Showing 11 results of 11

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 によって変換されたページ (->オリジナル) /