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


Showing 7 results of 7

From: Gökhan S. <gok...@gm...> - 2012年05月15日 23:57:45
Hello,
I have encountered a weird plotting issue recently using a recent mpl
clone. See the linked pdfs for better demonstration of the issue:
http://atmos.uwyo.edu/~gsever/data/vocals_RF04_NU05_newmpl.pdf
http://atmos.uwyo.edu/~gsever/data/vocals_RF04_NU05_oldmpl.pdf
newmpl file is created using the latest master branch (cloned and setup
today)
oldmpl is created using mpl v1.1.0 (
https://github.com/downloads/matplotlib/matplotlib/matplotlib-1.1.0.tar.gz)
Scroll down to page 4 in each file and you will see the wrong
plotted behavior of alwp_lcl (black line) variable on newmpl file comparing
to the correct version that is shown on oldmpl.
I was trying to figure out a way to correct this and I raised y-axis max to
2400 and then the line looks fine. However I have other data that show
similar wrong behaviors, so I decided to try earlier mpl versions since I
know that those plots were looking correct earlier (at least a few months
back). Trying v1.1.x branch gave me the same results. Note that these data
contain "nans". Are nan handling changed in recent mpl code or the way the
data is plotted out of margins? I can't reproduce this with synthetic data.
Any ideas as to what could be going wrong here?
Thanks.
-- 
Gökhan
From: Paul H. <pmh...@gm...> - 2012年05月15日 18:04:06
Neal,
I can't run your script as is, but something as simple as this show work:
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_xscale('log')
ax.xaxis.grid(True, which='major')
ax.xaxis.grid(True, which='minor')
plt.show()
On Tue, May 15, 2012 at 10:18 AM, Neal Becker <ndb...@gm...> wrote:
> In the following code snippet (not a complete example), I get the
> dashed lines for the minor ticks on the y (log) axis, but on the x axis, I only
> got the major ticks lines. How do I get minor lines to show up?
>
> (Previously, I tried without the MultipleLocator and set_minor_locator, but
> still got only major x axis lines plotted)
>
> import matplotlib.pyplot as plt
> fig = plt.figure()
> ax = fig.add_subplot(111)
>
> ax.semilogy (h1.buckets(), h1.cumulative())
> ax.semilogy (h2.buckets(), h2.inv_cumulative())
> from matplotlib.ticker import MultipleLocator
> minorLocator  = MultipleLocator(5)
> ax.xaxis.set_minor_locator(minorLocator)
> plt.grid(b=True, which='major', linestyle='solid')
> plt.grid(b=True, which='minor', linestyle='dashed')
> plt.show()
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Neal B. <ndb...@gm...> - 2012年05月15日 17:18:46
In the following code snippet (not a complete example), I get the
dashed lines for the minor ticks on the y (log) axis, but on the x axis, I only 
got the major ticks lines. How do I get minor lines to show up?
(Previously, I tried without the MultipleLocator and set_minor_locator, but 
still got only major x axis lines plotted)
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
ax.semilogy (h1.buckets(), h1.cumulative())
ax.semilogy (h2.buckets(), h2.inv_cumulative())
from matplotlib.ticker import MultipleLocator
minorLocator = MultipleLocator(5)
ax.xaxis.set_minor_locator(minorLocator)
plt.grid(b=True, which='major', linestyle='solid')
plt.grid(b=True, which='minor', linestyle='dashed')
plt.show()
From: Edward C. J. <edc...@co...> - 2012年05月15日 16:09:10
I use up-to-date Debian testing (wheezy) with the amd64 architecture
and Debian's python3.2. I install matplotlib from the tarball
 matplotlib-matplotlib-v1.1.0-684-ge87374e.tar.gz
Before the current install, I had also on my system Debian's
python-matplotlib and python-matplotlib-data packages. They contain 
some of the same
files as the tarball (/etc/matplotlibrc). I have completely removed the two
Debian packages. My Debian system includes the packages python3-tk, tck8.5,
tcl8.5-dev, tk8.5, and tk-dev.
I did a new matplotlib install, starting by unpacking the tarball.
In /usr/local/lib/python3.2/dist-packages/matplotlib/tests/test_text.py
in test_afm_kerning, I added before the assert:
 xxx = afm.string_width_height('VAVAVAVAVAVA')
 print(xxx)
The results are:
 > python3.2
Python 3.2.3rc2 (default, Mar 21 2012, 05:47:04)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import matplotlib
 >>> matplotlib.test()
..K........./usr/lib/python3/dist-packages/nose/tools.py:82:
ResourceWarning: unclosed file <_io.BufferedRandom name=3>
 pass
...../usr/lib/python3.2/subprocess.py:650: ResourceWarning: unclosed file
<_io.FileIO name=6 mode='rb'>
 _cleanup()
/usr/lib/python3.2/subprocess.py:650: ResourceWarning: unclosed file
<_io.FileIO name=8 mode='rb'>
 _cleanup()
Many "."s and "K"s are printed.
======================================================================
FAIL: matplotlib.tests.test_text.test_afm_kerning
----------------------------------------------------------------------
Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
 self.test(*self.arg)
 File
"/usr/local/lib/python3.2/dist-packages/matplotlib/tests/test_text.py", line
109, in test_afm_kerning
 assert afm.string_width_height('VAVAVAVAVAVA') == (7174.0, 718)
AssertionError: AssertionError:
-------------------- >> begin captured stdout << ---------------------
(8004.0, 718)
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------
Ran 1091 tests in 312.866s
FAILED (KNOWNFAIL=275, failures=1)
/usr/local/lib/python3.2/dist-packages/matplotlib/__init__.py:937:
/UserWarning: This call to matplotlib.use() has no effect
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
 if warn: warnings.warn(_use_error_msg)
False
 >>>
=======
Here is one of matplotlib's simple sample programs. It works.
#! /usr/bin/env python3.2
from pylab import *
t = arange(0.0, 2.0, 0.01)
s = sin(2*pi*t)
plot(t, s, linewidth=1.0)
xlabel('time (s)')
ylabel('voltage (mV)')
title('About as simple as it gets, folks')
grid(True)
show()
From: Michael D. <md...@st...> - 2012年05月15日 15:00:39
On 05/15/2012 10:15 AM, Edward C. Jones wrote:
> Michael Droettboom said
>
> > Are you running the tests from the source directory? That often
> results in failures that look like this.
>
> Yes, I did that. Some Googling found the correct way to do it:
>
> python3.2
> >>> import matplotlib
> >>> matplotlib.test()
> ..K........./usr/lib/python3/dist-packages/nose/tools.py:82:
> ResourceWarning: unclosed file<_io.BufferedRandom name=3>
> pass
> ...../usr/lib/python3.2/subprocess.py:650: ResourceWarning: unclosed file
> <_io.FileIO name=6 mode='rb'>
> _cleanup()
> /usr/lib/python3.2/subprocess.py:650: ResourceWarning: unclosed file
> <_io.FileIO name=8 mode='rb'>
> _cleanup()
>
> Many "."s and "K"s are output.
The K's are probably because some requirement of the test framework 
(ghostscript or inkscape) is not being found on your machine.
>
> FAIL: matplotlib.tests.test_text.test_afm_kerning
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
> self.test(*self.arg)
> File
> "/usr/local/lib/python3.2/dist-packages/matplotlib/tests/test_text.py", line
> 107, in test_afm_kerning
> assert afm.string_width_height('VAVAVAVAVAVA') == (7174.0, 718)
> AssertionError
>
> ----------------------------------------------------------------------
> Ran 1091 tests in 310.441s
>
> FAILED (KNOWNFAIL=275, failures=1)
> False
>
This is a new test as of yesterday. Can you add a print to figure out 
what afm.string_width_height() returns? I'm curious as to what way this 
is failing on your machine.
Mike
From: Edward C. J. <edc...@co...> - 2012年05月15日 14:16:29
Michael Droettboom said
 > Are you running the tests from the source directory? That often 
results in failures that look like this.
Yes, I did that. Some Googling found the correct way to do it:
python3.2
 >>> import matplotlib
 >>> matplotlib.test()
..K........./usr/lib/python3/dist-packages/nose/tools.py:82:
ResourceWarning: unclosed file <_io.BufferedRandom name=3>
 pass
...../usr/lib/python3.2/subprocess.py:650: ResourceWarning: unclosed file
<_io.FileIO name=6 mode='rb'>
 _cleanup()
/usr/lib/python3.2/subprocess.py:650: ResourceWarning: unclosed file
<_io.FileIO name=8 mode='rb'>
 _cleanup()
Many "."s and "K"s are output.
FAIL: matplotlib.tests.test_text.test_afm_kerning
----------------------------------------------------------------------
Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
 self.test(*self.arg)
 File
"/usr/local/lib/python3.2/dist-packages/matplotlib/tests/test_text.py", line
107, in test_afm_kerning
 assert afm.string_width_height('VAVAVAVAVAVA') == (7174.0, 718)
AssertionError
----------------------------------------------------------------------
Ran 1091 tests in 310.441s
FAILED (KNOWNFAIL=275, failures=1)
False
From: Michael D. <md...@st...> - 2012年05月15日 12:38:53
Are you running the tests from the source directory? That often results 
in failures that look like this.
Mike
On 05/14/2012 06:11 PM, Edward C. Jones wrote:
> I use up-to-date Debian testing (wheezy) with an amd64 architecture. I
> am trying to use matplotlib with Python 3.2, I downloaded
> matplotlib-matplotlib-v1.1.0-684-ge87374e.tar.gz
> I expanded the tarball and did
> python3.2 setup.py build
> and, as root,
> python3.2 setup.py install
>
> When I tried to run
> python3.2 tests.py
> I had two types of error. First the files in lib/dateutil: parser.py,
> rrule.py, etc. had not been run through 2to3. I removed back-quotes,
> used the function-call form for exceptions, and fixed some import
> statements.
>
> After fixing these errors I get 13 messages like:
>
> ERROR: Failure: AttributeError ('module' object has no attribute
> 'test_backend_svg')
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/lib/python3/dist-packages/nose/failure.py", line 37, in
> runTest
> raise self.exc_class(self.exc_val).with_traceback(self.tb)
> File "/usr/lib/python3/dist-packages/nose/loader.py", line 379, in
> loadTestsFromName
> module = resolve_name(addr.module)
> File "/usr/lib/python3/dist-packages/nose/util.py", line 331, in
> resolve_name
> obj = getattr(obj, part)
> AttributeError: 'module' object has no attribute 'test_backend_svg'
>
> These tests are all in build/lib.linux-x86_64-3.2/matplotlib/tests.
>
> There is a similar problem in
> http://sourceforge.net/mailarchive/message.php?msg_id=28398373
>
> What is the problem and the fix?
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Showing 7 results of 7

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