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
(2) |
2
(1) |
3
(2) |
4
(1) |
5
|
6
|
7
(2) |
8
(1) |
9
|
10
(2) |
11
|
12
|
13
|
14
(7) |
15
|
16
|
17
|
18
(3) |
19
|
20
(1) |
21
|
22
|
23
|
24
|
25
|
26
(4) |
27
(3) |
28
(1) |
29
|
30
|
31
(1) |
|
|
|
|
|
From: Thomas C. <tca...@gm...> - 2015-08-31 03:22:12
|
Neal, This is possible, but I suspect requires managing the visibility flipping and resizing your self. This does seem like a useful thing to build out and couples well with an open issue about changing the gird size after the fact. Tom On Tue, May 26, 2015 at 3:26 PM Neal Becker <ndb...@gm...> wrote: > I'm plotting 1 figure with 8 subplots. They are 8 channels, and I want to > see if there is some interaction. > > I wish that the 'configure subplots' menu allowed me to choose just some > subplots to display (resizing when I turn some off), so I could get a > better view at the selected subplots. > > > -- > Those who fail to understand recursion are doomed to repeat it > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: chtan <ch...@un...> - 2015-08-28 02:44:25
|
Great, thanks! Rgds marcus -- View this message in context: http://matplotlib.1069221.n5.nabble.com/boxplot-behaviour-in-an-extreme-scenario-tp46027p46034.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Paul H. <pmh...@gm...> - 2015-08-27 04:37:17
|
Even though I'm familiar with the boxplot source code, I largely use IPython for quick investigations like this. In IPython, doing something like "matplotlib.Axes.boxplot??" shows the full source code for that functions\. Then I saw/remembered that boxplot now just calls matplotlib.cbook.boxplot_stats and passes the results to matplotlib.Axes.bxp. So then I did "matplotlib.cbook.boxplot_stats" to see how the whiskers were computed. -paul On Wed, Aug 26, 2015 at 8:43 PM, chtan <ch...@un...> wrote: > Uh, now I understand why it's behaving this way. Tx Paul. > > >From the documentation, it seems natural to expect the behaviour to be > uniform throughout the meaningful range for IQR. > > How may I go about searching for the responsible code on my own in > situations like this? > >From the perplexing behaviour to the little nugget in > matplotlib.cbook.boxplot_stats, the path isn't clear to me. > > Any general advice? > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/boxplot-behaviour-in-an-extreme-scenario-tp46027p46032.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: chtan <ch...@un...> - 2015-08-27 03:43:43
|
Uh, now I understand why it's behaving this way. Tx Paul. >From the documentation, it seems natural to expect the behaviour to be uniform throughout the meaningful range for IQR. How may I go about searching for the responsible code on my own in situations like this? >From the perplexing behaviour to the little nugget in matplotlib.cbook.boxplot_stats, the path isn't clear to me. Any general advice? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/boxplot-behaviour-in-an-extreme-scenario-tp46027p46032.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: chtan <ch...@un...> - 2015-08-27 03:35:26
|
I'm on python 2. I get the same outputs after adding "from __future__ import division". -- View this message in context: http://matplotlib.1069221.n5.nabble.com/boxplot-behaviour-in-an-extreme-scenario-tp46027p46031.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Thales M. <tha...@gm...> - 2015-08-26 22:12:33
|
Hello, I am migrating from octave to python and found matplotlib as an useful and powerful resource. I played with many animations examples and tried to build my own. The objective is to build a live plot from data coming from an arduino. The serial is working perfect (I can receive and plot data without problem). Unfortunately, when I resize my animation windows, I get curves overlapped. I must use blit because I have 6 subplots. Please, check the attached files: Python: -> animationR00.py (main) -> lib/ -> AnalogPlot.py -> RingBuffer.py -> crc8.py Arduino: Teste.cpp (main) Teste.h ComSerial.cpp ComSerial.h OneWire.cpp OneWire.h I appreciate any help. - Thales Alexandre Carvalho Maia |
From: Paul H. <pmh...@gm...> - 2015-08-26 08:16:25
|
Your perturbed and unperturbed scenarios draw the same figure on my machine (mpl v1.4.1). The reason why you don't get any outliers is the following: Boxplot uses matplotlib.cbook.boxplot_stats under the hood to compute where everything will be drawn. If you look in there, you'll see this little nugget: # interquartile range stats['iqr'] = q3 - q1 if stats['iqr'] == 0: whis = 'range' When whis = 'range', the whiskers fall back to extending to the min an max. So that is at least the intent of the code. Open to a different interpretation of what should be happening, though. On Wed, Aug 26, 2015 at 1:08 AM, Paul Hobson <pmh...@gm...> wrote: > Are you running python 2 or python 3? If you're on python 2, what happens > if you add "from __future__ import division" to the top of your script? > > On Tue, Aug 25, 2015 at 10:31 PM, chtan <ch...@un...> wrote: > >> Hi, >> >> the outliers in the boxplot do not seem to be drawn in the following >> extreme >> scenario: >> Data Value: 1, Frequency: 5 >> Data Value: 2, Frequency: 100 >> Data Value: 3, Frequency: 5 >> >> Here, Q1 = Q2 = Q3, so IQR = 0. >> Data values 1 and 3 are therefore outliers according to the definition in >> the api >> (Refer to parameter "whis" under "boxplot": >> http://matplotlib.org/api/pyplot_api.html >> <http://matplotlib.org/api/pyplot_api.html> ) >> >> But the code below produces a boxplot that shows them as max-min whiskers >> (rather than fliers): >> >> import matplotlib.pyplot as plt >> data = 100 * [2] + 5 * [1] + 5 * [3] >> ax = plt.gca() >> bp = ax.boxplot(data, showfliers=True) >> for flier in bp['fliers']: >> flier.set(marker='o', color='gray') >> >> <http://matplotlib.1069221.n5.nabble.com/file/n46027/figure_1.png> >> >> >> What I though it would look like is obtained by perturbing half of the >> data >> points 2 to 2.000001: >> >> <http://matplotlib.1069221.n5.nabble.com/file/n46027/figure_2.png> >> >> >> Is this a bug or I'm not getting something right? >> >> rgds >> marcus >> >> >> >> -- >> View this message in context: >> http://matplotlib.1069221.n5.nabble.com/boxplot-behaviour-in-an-extreme-scenario-tp46027.html >> Sent from the matplotlib - users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > |
From: Paul H. <pmh...@gm...> - 2015-08-26 08:08:32
|
Are you running python 2 or python 3? If you're on python 2, what happens if you add "from __future__ import division" to the top of your script? On Tue, Aug 25, 2015 at 10:31 PM, chtan <ch...@un...> wrote: > Hi, > > the outliers in the boxplot do not seem to be drawn in the following > extreme > scenario: > Data Value: 1, Frequency: 5 > Data Value: 2, Frequency: 100 > Data Value: 3, Frequency: 5 > > Here, Q1 = Q2 = Q3, so IQR = 0. > Data values 1 and 3 are therefore outliers according to the definition in > the api > (Refer to parameter "whis" under "boxplot": > http://matplotlib.org/api/pyplot_api.html > <http://matplotlib.org/api/pyplot_api.html> ) > > But the code below produces a boxplot that shows them as max-min whiskers > (rather than fliers): > > import matplotlib.pyplot as plt > data = 100 * [2] + 5 * [1] + 5 * [3] > ax = plt.gca() > bp = ax.boxplot(data, showfliers=True) > for flier in bp['fliers']: > flier.set(marker='o', color='gray') > > <http://matplotlib.1069221.n5.nabble.com/file/n46027/figure_1.png> > > > What I though it would look like is obtained by perturbing half of the data > points 2 to 2.000001: > > <http://matplotlib.1069221.n5.nabble.com/file/n46027/figure_2.png> > > > Is this a bug or I'm not getting something right? > > rgds > marcus > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/boxplot-behaviour-in-an-extreme-scenario-tp46027.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: chtan <ch...@un...> - 2015-08-26 05:32:03
|
Hi, the outliers in the boxplot do not seem to be drawn in the following extreme scenario: Data Value: 1, Frequency: 5 Data Value: 2, Frequency: 100 Data Value: 3, Frequency: 5 Here, Q1 = Q2 = Q3, so IQR = 0. Data values 1 and 3 are therefore outliers according to the definition in the api (Refer to parameter "whis" under "boxplot": http://matplotlib.org/api/pyplot_api.html <http://matplotlib.org/api/pyplot_api.html> ) But the code below produces a boxplot that shows them as max-min whiskers (rather than fliers): import matplotlib.pyplot as plt data = 100 * [2] + 5 * [1] + 5 * [3] ax = plt.gca() bp = ax.boxplot(data, showfliers=True) for flier in bp['fliers']: flier.set(marker='o', color='gray') <http://matplotlib.1069221.n5.nabble.com/file/n46027/figure_1.png> What I though it would look like is obtained by perturbing half of the data points 2 to 2.000001: <http://matplotlib.1069221.n5.nabble.com/file/n46027/figure_2.png> Is this a bug or I'm not getting something right? rgds marcus -- View this message in context: http://matplotlib.1069221.n5.nabble.com/boxplot-behaviour-in-an-extreme-scenario-tp46027.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Oliver <oli...@gm...> - 2015-08-20 15:53:28
|
It would seem the `axesA` keyword always has to be the "latest" axes. If not, the connector does not get added to the figure. Minimal, complete and verifiable example: ###### from matplotlib.patches import ConnectionPatch import matplotlib.pyplot as plt import matplotlib as mpl import platform print(mpl.__version__) print(platform.python_version()) xya = (.5,.5) xyb = (.6,.7) # shows nothing f1, (ax11, ax12) = plt.subplots(1,2, sharey=False) con1 = ConnectionPatch(xyA=xya, xyB=xyb , coordsA='data', coordsB='data', axesA=ax12, axesB=ax11) ax11.add_artist(con1) # shows clipped line f2, (ax21, ax22) = plt.subplots(1,2, sharey=False) con2 = ConnectionPatch(xyA=xyb, xyB=xya , coordsA='data', coordsB='data', axesA=ax21, axesB=ax22) ax21.add_artist(con2) # shows desired result f3, (ax31, ax32) = plt.subplots(1,2, sharey=False) con3 = ConnectionPatch(xyA=xya, xyB=xyb , coordsA='data', coordsB='data', axesA=ax32, axesB=ax31) ax32.add_artist(con3) # shows nothing f4, (ax41, ax42) = plt.subplots(1,2, sharey=False) con4 = ConnectionPatch(xyA=xyb, xyB=xya , coordsA='data', coordsB='data', axesA=ax41, axesB=ax42) ax42.add_artist(con4) plt.draw() plt.show() ###### While reference to clipping is made in the user guide[1], the seemingly forced choice of `axesA` had me stumped for quite some time. While I understand that the choice of the axes to add the connector is important to avoid overlap (in other words, on which axes one should call the `add_artist` method), it seems unimportant whether xyA or xyB are referenced in ax1 or ax2. To clarify: I was expecting example 4 above to show a similar line as example 3. [1]: http://matplotlib.org/users/annotations_guide.html#using-connectorpatch |
From: Thomas C. <tca...@gm...> - 2015-08-18 16:53:58
|
Also, please use the new mailing list at mat...@py... On Tue, Aug 18, 2015 at 12:53 PM Thomas Caswell <tca...@gm...> wrote: > This is related to files from the previous implementation still being > around. Please make sure you have fully removed the old mpl installation > before installing the new one. Be aware that there is some difference in > the way pip/setuptools/distutils deal with namespace packages so look for > both `matplotlib` and `mpl_toolkits` directories. > > Tom > > On Tue, Aug 18, 2015 at 12:49 PM Bob Dobalina <asp...@gm...> wrote: > >> When trying to create a 3D axes, I receive this error: >> >> /usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.pyc in grid(self, >> b, **kwargs) >> 1254 if len(kwargs) : >> 1255 b = True >> -> 1256 self._draw_grid = maxes._string_to_bool(b) >> 1257 >> 1258 def ticklabel_format(self, **kwargs) : >> >> AttributeError: 'module' object has no attribute '_string_to_bool' >> >> I'm running matplotlib 1.4.3 on linux (ubuntu-based), and was able to >> create >> 3D axes until I updated last week. >> >> Thanks in advance. >> >> >> >> >> -- >> View this message in context: >> http://matplotlib.1069221.n5.nabble.com/Problem-AttributeError-module-object-has-no-attribute-string-to-bool-tp46020.html >> Sent from the matplotlib - users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > |
From: Thomas C. <tca...@gm...> - 2015-08-18 16:53:34
|
This is related to files from the previous implementation still being around. Please make sure you have fully removed the old mpl installation before installing the new one. Be aware that there is some difference in the way pip/setuptools/distutils deal with namespace packages so look for both `matplotlib` and `mpl_toolkits` directories. Tom On Tue, Aug 18, 2015 at 12:49 PM Bob Dobalina <asp...@gm...> wrote: > When trying to create a 3D axes, I receive this error: > > /usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.pyc in grid(self, > b, **kwargs) > 1254 if len(kwargs) : > 1255 b = True > -> 1256 self._draw_grid = maxes._string_to_bool(b) > 1257 > 1258 def ticklabel_format(self, **kwargs) : > > AttributeError: 'module' object has no attribute '_string_to_bool' > > I'm running matplotlib 1.4.3 on linux (ubuntu-based), and was able to > create > 3D axes until I updated last week. > > Thanks in advance. > > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Problem-AttributeError-module-object-has-no-attribute-string-to-bool-tp46020.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Bob D. <asp...@gm...> - 2015-08-18 16:49:17
|
When trying to create a 3D axes, I receive this error: /usr/lib/pymodules/python2.7/mpl_toolkits/mplot3d/axes3d.pyc in grid(self, b, **kwargs) 1254 if len(kwargs) : 1255 b = True -> 1256 self._draw_grid = maxes._string_to_bool(b) 1257 1258 def ticklabel_format(self, **kwargs) : AttributeError: 'module' object has no attribute '_string_to_bool' I'm running matplotlib 1.4.3 on linux (ubuntu-based), and was able to create 3D axes until I updated last week. Thanks in advance. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Problem-AttributeError-module-object-has-no-attribute-string-to-bool-tp46020.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Thomas C. <tca...@gm...> - 2015-08-14 17:48:39
|
If you are trying to read a CSV file, I strongly suspect using pandas for ingesting them. http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html Also, please use the new mailing list at mat...@py.... Tom On Fri, Aug 14, 2015 at 1:39 PM Anthony Rollett <ro...@an...> wrote: > Maybe using “genfromtxt" is simpler as a way to get going, see below for a > fragment of script? It should be able to read a CSV file since it’s just a > comma delimited text file. You might need to look up how to set the > delimiter character. > regards > Tony Rollet > > > #!/usr/bin/env python > > """ > > simple line/scatter plot. > > """ > > import matplotlib > > import numpy as np > > import matplotlib.cm as cm > > import matplotlib.mlab as mlab > > import matplotlib.pyplot as plt > > from numpy import * > > import scipy.interpolate > > > > isosphere = genfromtxt("KAM_test_5Oct14strs_strn.txt", names=True ) > > > > On Aug 14, 2015, at 12:05 PM, Kevin Parks <kp...@me...> wrote: > > > Hi, > > > > That doesn’t work. Just having my own msft.csv file in my directory > doesn't change anything as it is still pointing to some other msft.csv > someplace on my computron. (what and where is this file?) > > > > I also have never opened a file this way. I had prevously just used > something like: > > > > for l in open(filename).readlines(): > > l = l.strip().split() > > data.append([float(l[0]), float(l[1]), float(l[2]), int(l[3])]) > > > > values = [1,2,3,4] > > > > - > > > > I think ithis is just some example file that gets installed some place > so that the examples work? > > > > What does asfileobj=False do? > > > > Goodness the whole world of Python has radically changed in the short > time I have been out of the game. > > > > > > > >> On Aug 15, 2015, at 1:50 AM, Christian Alis <ia...@gm...> wrote: > >> > >> The sample code reads data from msft.csv. If you enter your data into > >> a text editor and save it as msft.csv in python's current working > >> directory, then the following minimal code (pruned from plotfile_demo) > >> should work: > >> > >> from pylab import plotfile, show, gca > >> import matplotlib.cbook as cbook > >> > >> fname = cbook.get_sample_data('msft.csv', asfileobj=False) > >> > >> #test 5; single subplot > >> plotfile(fname, ('date', 'open', 'high', 'low', 'close'), > subplots=False) > >> > >> show() > >> > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Anthony R. <ro...@an...> - 2015-08-14 17:39:14
|
Maybe using “genfromtxt" is simpler as a way to get going, see below for a fragment of script? It should be able to read a CSV file since it’s just a comma delimited text file. You might need to look up how to set the delimiter character. regards Tony Rollet > #!/usr/bin/env python > """ > simple line/scatter plot. > """ > import matplotlib > import numpy as np > import matplotlib.cm as cm > import matplotlib.mlab as mlab > import matplotlib.pyplot as plt > from numpy import * > import scipy.interpolate > > isosphere = genfromtxt("KAM_test_5Oct14strs_strn.txt", names=True ) On Aug 14, 2015, at 12:05 PM, Kevin Parks <kp...@me...> wrote: > Hi, > > That doesn’t work. Just having my own msft.csv file in my directory doesn't change anything as it is still pointing to some other msft.csv someplace on my computron. (what and where is this file?) > > I also have never opened a file this way. I had prevously just used something like: > > for l in open(filename).readlines(): > l = l.strip().split() > data.append([float(l[0]), float(l[1]), float(l[2]), int(l[3])]) > > values = [1,2,3,4] > > - > > I think ithis is just some example file that gets installed some place so that the examples work? > > What does asfileobj=False do? > > Goodness the whole world of Python has radically changed in the short time I have been out of the game. > > > >> On Aug 15, 2015, at 1:50 AM, Christian Alis <ia...@gm...> wrote: >> >> The sample code reads data from msft.csv. If you enter your data into >> a text editor and save it as msft.csv in python's current working >> directory, then the following minimal code (pruned from plotfile_demo) >> should work: >> >> from pylab import plotfile, show, gca >> import matplotlib.cbook as cbook >> >> fname = cbook.get_sample_data('msft.csv', asfileobj=False) >> >> #test 5; single subplot >> plotfile(fname, ('date', 'open', 'high', 'low', 'close'), subplots=False) >> >> show() >> > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Kevin P. <kp...@me...> - 2015-08-14 17:37:38
|
That does help. But then that means I need to reformat my data somehow? I want it so that each “voice” is plotted separately as a unique color and my legend would be Voice 1 ----- Voice 2 ----- Voice 3 ----- Voice 4 ----- Just as if I had the temperature for four different days plotted. confused > On Aug 15, 2015, at 2:14 AM, Benjamin Root <ben...@ou...> wrote: > > All "cbook.get_sample_data(..., asfileobj=False)" does is returns the full filename path to a given file stored in our package for demonstration purposes. You can ignore that entirely. Just say "fname = 'foobar.csv'" and have your own csv file called "foobar.csv" sitting in your current working directory. "plotfile()" works by reading in a CSV file and plotting the columns given. So, the CSV file will need in its first line those column headers. The first one given will be for the x-axis, while the rest are for the individual lines. > > Does that help? > Ben Root > |
From: Christian A. <ia...@gm...> - 2015-08-14 17:20:35
|
According to http://matplotlib.org/1.4.3/api/cbook_api.html#matplotlib.cbook.get_sample_data, msft.csv should be located at the mpl-data/sample_data directory. In that case, save the following as sample.csv on the current directory: event_start_time, event_duration, frequency_value, voice 0.0, 2.5, 60, 1 2.0, 1.5, 62, 4 4.0, 5.0, 64, 2 6.0, 3.5, 65, 3 8.0, 1.5, 67, 1 10.0, 2.0, 69, 4 12.0, 5.5, 71, 3 14.0, 3.0, 70, 2 16.0, 2.0, 72, 1 18.0, 1.0, 74, 4 20.0, 0.5, 75, 3 22.0, 1.5, 77, 2 24.0, 0.5, 79, 1 Then run the following code: from pylab import plotfile, show, gca #test 5; single subplot plotfile('sample.csv', ('event_start_time', 'event_duration', 'frequency_value', 'voice'), subplots=False) show() Regards, Christian On Fri, Aug 14, 2015 at 6:05 PM, Kevin Parks <kp...@me...> wrote: > Hi, > > That doesn’t work. Just having my own msft.csv file in my directory doesn't change anything as it is still pointing to some other msft.csv someplace on my computron. (what and where is this file?) > > I also have never opened a file this way. I had prevously just used something like: > > for l in open(filename).readlines(): > l = l.strip().split() > data.append([float(l[0]), float(l[1]), float(l[2]), int(l[3])]) > > values = [1,2,3,4] > > - > > I think ithis is just some example file that gets installed some place so that the examples work? > > What does asfileobj=False do? > > Goodness the whole world of Python has radically changed in the short time I have been out of the game. > > > >> On Aug 15, 2015, at 1:50 AM, Christian Alis <ia...@gm...> wrote: >> >> The sample code reads data from msft.csv. If you enter your data into >> a text editor and save it as msft.csv in python's current working >> directory, then the following minimal code (pruned from plotfile_demo) >> should work: >> >> from pylab import plotfile, show, gca >> import matplotlib.cbook as cbook >> >> fname = cbook.get_sample_data('msft.csv', asfileobj=False) >> >> #test 5; single subplot >> plotfile(fname, ('date', 'open', 'high', 'low', 'close'), subplots=False) >> >> show() >> > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Benjamin R. <ben...@ou...> - 2015-08-14 17:15:15
|
All "cbook.get_sample_data(..., asfileobj=False)" does is returns the full filename path to a given file stored in our package for demonstration purposes. You can ignore that entirely. Just say "fname = 'foobar.csv'" and have your own csv file called "foobar.csv" sitting in your current working directory. "plotfile()" works by reading in a CSV file and plotting the columns given. So, the CSV file will need in its first line those column headers. The first one given will be for the x-axis, while the rest are for the individual lines. Does that help? Ben Root On Fri, Aug 14, 2015 at 1:05 PM, Kevin Parks <kp...@me...> wrote: > Hi, > > That doesn’t work. Just having my own msft.csv file in my directory > doesn't change anything as it is still pointing to some other msft.csv > someplace on my computron. (what and where is this file?) > > I also have never opened a file this way. I had prevously just used > something like: > > for l in open(filename).readlines(): > l = l.strip().split() > data.append([float(l[0]), float(l[1]), float(l[2]), int(l[3])]) > > values = [1,2,3,4] > > - > > I think ithis is just some example file that gets installed some place so > that the examples work? > > What does asfileobj=False do? > > Goodness the whole world of Python has radically changed in the short time > I have been out of the game. > > > > > On Aug 15, 2015, at 1:50 AM, Christian Alis <ia...@gm...> wrote: > > > > The sample code reads data from msft.csv. If you enter your data into > > a text editor and save it as msft.csv in python's current working > > directory, then the following minimal code (pruned from plotfile_demo) > > should work: > > > > from pylab import plotfile, show, gca > > import matplotlib.cbook as cbook > > > > fname = cbook.get_sample_data('msft.csv', asfileobj=False) > > > > #test 5; single subplot > > plotfile(fname, ('date', 'open', 'high', 'low', 'close'), subplots=False) > > > > show() > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Kevin P. <kp...@me...> - 2015-08-14 17:05:55
|
Hi, That doesn’t work. Just having my own msft.csv file in my directory doesn't change anything as it is still pointing to some other msft.csv someplace on my computron. (what and where is this file?) I also have never opened a file this way. I had prevously just used something like: for l in open(filename).readlines(): l = l.strip().split() data.append([float(l[0]), float(l[1]), float(l[2]), int(l[3])]) values = [1,2,3,4] - I think ithis is just some example file that gets installed some place so that the examples work? What does asfileobj=False do? Goodness the whole world of Python has radically changed in the short time I have been out of the game. > On Aug 15, 2015, at 1:50 AM, Christian Alis <ia...@gm...> wrote: > > The sample code reads data from msft.csv. If you enter your data into > a text editor and save it as msft.csv in python's current working > directory, then the following minimal code (pruned from plotfile_demo) > should work: > > from pylab import plotfile, show, gca > import matplotlib.cbook as cbook > > fname = cbook.get_sample_data('msft.csv', asfileobj=False) > > #test 5; single subplot > plotfile(fname, ('date', 'open', 'high', 'low', 'close'), subplots=False) > > show() > |
From: Kevin P. <kp...@me...> - 2015-08-14 16:30:41
|
I am a very lost gnuplot.py refugee. I hung in there as long as I could but sadly, gnuplotpy does not run on my machine so I managed, somehow to install new pythons, matplotlib, numpy, etc. and am up and running. Actually now trying out Canopy, which was even easier than running from the shell on OS X. I am trying to plot some data by looking through the examples, finding something close to what I need and modifying it to work for the data I want to plot but I am lost and overwhelmed. Any pointers at all would be greatly appreciated. What I want to do surely is easy but I am really new at this and have been away from python a long time. I am reading the docs as fast as I can. The task at hand: I have 4 lines that I want to plot on top of each other (different colors) and the data, rather than being generated with an algorithm in python would be read in from a file. A plot that looks close is #5 from plotfile_demo.py (seen here: http://matplotlib.org/mpl_examples/pylab_examples/plotfile_demo_04.png <http://matplotlib.org/mpl_examples/pylab_examples/plotfile_demo_04.png>) but that is confusing as it seems to open some file that I can’t seem to find in my install called 'msft.csv' and I am not sure the way it is doing the plot is all that customizable as the code for it is tiny and the routine it calls seems to do a lot of formatting automatically. The easiest way to explain what need to do is to give a simplified task that is analogous, such as plot 4 individual simultaneous lines to show how they overlap and intersect and also their global motion, much like showing, say, the movement and relationship of distinct musical lines in an 4 voice choir(SATB) piece (that isn’t what I am doing but it is darned close). In short I want to have a data file that has: event_start_time, event_duration, frequency_value(for now midi will do), voice (perhaps specified with a number like: 1=soprano, 2=alto, 3=tenor, 4=bass each voice in a different color) So the data would like so (quick & totally random at the moment): 0.0, 2.5, 60, 1 2.0, 1.5, 62, 4 4.0, 5.0, 64, 2 6.0, 3.5, 65, 3 8.0, 1.5, 67, 1 10.0, 2.0, 69, 4 12.0, 5.5, 71, 3 14.0, 3.0, 70, 2 16.0, 2.0, 72, 1 18.0, 1.0, 74, 4 20.0, 0.5, 75, 3 22.0, 1.5, 77, 2 24.0, 0.5, 79, 1 The legend just like in the above example and the x axis would be time and y axis frequency. Then I would have to figure out tic values and all that. I have been away from the whole world of python for a long while but I used to do this with great easy and flexibility in gnuplot.py even if the graphs did not look as lovely as these matlabplotlib ones do but this package is really new to me and I am somewhat overwhelmed by the enormity of matlabplotlib. Very sorry for such a newbie query but I feel like if i could get this going I would at least know which aspects of the package I need to read up on. |
From: Thomas C. <tca...@gm...> - 2015-08-10 13:57:09
|
Also try deleting your font cache. Have you tried with the master branch? Tom On Mon, Aug 10, 2015 at 9:21 AM Benjamin Root <ben...@ou...> wrote: > I don't know for certain, but perhaps the font-forge program has a repair > utility? http://fontforge.github.io/en-US/ > > On Sat, Aug 8, 2015 at 5:51 AM, knight91 <kni...@we...> wrote: > >> Okay, is there a way to get an afm font file with a nicely formed header? >> How >> could I try to solve this problem? >> >> >> Thomas Caswell wrote >> > You have an afm font file with a badly formed header. I thought this >> was >> > fixed on the master branch though.... >> > >> > On Fri, Aug 7, 2015 at 4:51 PM knight91 < >> >> > knight91@ >> >> > > wrote: >> > >> >> Python claims to be unable to import pyplot. Apart from that, it has >> been >> >> running absolutely fine. >> >> >> >> I tried different versions of matplotlib, the one provided in my >> package >> >> manager (apt-get) and two (stable & last stable) releases compiled from >> >> source. I reinstalled all packages containting "python" on my system >> >> (Ubuntu >> >> 14.04 LTS). This error still occurs and prevents me from using pyplot. >> >> >> >> What should I try next? >> >> >> >> Python 2.7.6 (default, Jun 22 2015, 17:58:13) >> >> [GCC 4.8.2] on linux2 >> >> >>> from matplotlib import pyplot >> >> Traceback (most recent call last): >> >> File " >> > <stdin> >> > ", line 1, in >> > <module> >> >> File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in >> >> >> > <module> >> >> import matplotlib.colorbar >> >> File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in >> >> >> > <module> >> >> import matplotlib.collections as collections >> >> File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, >> >> in >> >> >> > <module> >> >> import matplotlib.backend_bases as backend_bases >> >> File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line >> 50, >> >> in >> >> >> > <module> >> >> import matplotlib.textpath as textpath >> >> File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in >> >> >> > <module> >> >> import matplotlib.font_manager as font_manager >> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line >> >> 1356, >> >> in >> > <module> >> >> _rebuild() >> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line >> >> 1341, >> >> in _rebuild >> >> fontManager = FontManager() >> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line >> >> 1008, >> >> in __init__ >> >> self.afmlist = createFontList(self.afmfiles, fontext='afm') >> >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line >> 563, >> >> in >> >> createFontList >> >> font = afm.AFM(fh) >> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in >> >> __init__ >> >> parse_afm(fh) >> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in >> >> parse_afm >> >> dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh) >> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in >> >> _parse_char_metrics >> >> bbox = _to_list_of_floats(vals[3][2:]) >> >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in >> >> _to_list_of_floats >> >> return [_to_float(val) for val in s.split()] >> >> ValueError: invalid literal for float(): 19# >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000p46002.html >> Sent from the matplotlib - users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Benjamin R. <ben...@ou...> - 2015-08-10 13:20:14
|
I don't know for certain, but perhaps the font-forge program has a repair utility? http://fontforge.github.io/en-US/ On Sat, Aug 8, 2015 at 5:51 AM, knight91 <kni...@we...> wrote: > Okay, is there a way to get an afm font file with a nicely formed header? > How > could I try to solve this problem? > > > Thomas Caswell wrote > > You have an afm font file with a badly formed header. I thought this was > > fixed on the master branch though.... > > > > On Fri, Aug 7, 2015 at 4:51 PM knight91 < > > > knight91@ > > > > wrote: > > > >> Python claims to be unable to import pyplot. Apart from that, it has > been > >> running absolutely fine. > >> > >> I tried different versions of matplotlib, the one provided in my package > >> manager (apt-get) and two (stable & last stable) releases compiled from > >> source. I reinstalled all packages containting "python" on my system > >> (Ubuntu > >> 14.04 LTS). This error still occurs and prevents me from using pyplot. > >> > >> What should I try next? > >> > >> Python 2.7.6 (default, Jun 22 2015, 17:58:13) > >> [GCC 4.8.2] on linux2 > >> >>> from matplotlib import pyplot > >> Traceback (most recent call last): > >> File " > > <stdin> > > ", line 1, in > > <module> > >> File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in > >> > > <module> > >> import matplotlib.colorbar > >> File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in > >> > > <module> > >> import matplotlib.collections as collections > >> File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, > >> in > >> > > <module> > >> import matplotlib.backend_bases as backend_bases > >> File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line > 50, > >> in > >> > > <module> > >> import matplotlib.textpath as textpath > >> File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in > >> > > <module> > >> import matplotlib.font_manager as font_manager > >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line > >> 1356, > >> in > > <module> > >> _rebuild() > >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line > >> 1341, > >> in _rebuild > >> fontManager = FontManager() > >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line > >> 1008, > >> in __init__ > >> self.afmlist = createFontList(self.afmfiles, fontext='afm') > >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line > 563, > >> in > >> createFontList > >> font = afm.AFM(fh) > >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in > >> __init__ > >> parse_afm(fh) > >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in > >> parse_afm > >> dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh) > >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in > >> _parse_char_metrics > >> bbox = _to_list_of_floats(vals[3][2:]) > >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in > >> _to_list_of_floats > >> return [_to_float(val) for val in s.split()] > >> ValueError: invalid literal for float(): 19# > >> > > > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000p46002.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: knight91 <kni...@we...> - 2015-08-08 09:51:46
|
Okay, is there a way to get an afm font file with a nicely formed header? How could I try to solve this problem? Thomas Caswell wrote > You have an afm font file with a badly formed header. I thought this was > fixed on the master branch though.... > > On Fri, Aug 7, 2015 at 4:51 PM knight91 < > knight91@ > > wrote: > >> Python claims to be unable to import pyplot. Apart from that, it has been >> running absolutely fine. >> >> I tried different versions of matplotlib, the one provided in my package >> manager (apt-get) and two (stable & last stable) releases compiled from >> source. I reinstalled all packages containting "python" on my system >> (Ubuntu >> 14.04 LTS). This error still occurs and prevents me from using pyplot. >> >> What should I try next? >> >> Python 2.7.6 (default, Jun 22 2015, 17:58:13) >> [GCC 4.8.2] on linux2 >> >>> from matplotlib import pyplot >> Traceback (most recent call last): >> File " > <stdin> > ", line 1, in > <module> >> File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in >> > <module> >> import matplotlib.colorbar >> File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in >> > <module> >> import matplotlib.collections as collections >> File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, >> in >> > <module> >> import matplotlib.backend_bases as backend_bases >> File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 50, >> in >> > <module> >> import matplotlib.textpath as textpath >> File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in >> > <module> >> import matplotlib.font_manager as font_manager >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line >> 1356, >> in > <module> >> _rebuild() >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line >> 1341, >> in _rebuild >> fontManager = FontManager() >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line >> 1008, >> in __init__ >> self.afmlist = createFontList(self.afmfiles, fontext='afm') >> File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 563, >> in >> createFontList >> font = afm.AFM(fh) >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in >> __init__ >> parse_afm(fh) >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in >> parse_afm >> dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh) >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in >> _parse_char_metrics >> bbox = _to_list_of_floats(vals[3][2:]) >> File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in >> _to_list_of_floats >> return [_to_float(val) for val in s.split()] >> ValueError: invalid literal for float(): 19# >> -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000p46002.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Thomas C. <tca...@gm...> - 2015-08-07 20:53:52
|
You have an afm font file with a badly formed header. I thought this was fixed on the master branch though.... On Fri, Aug 7, 2015 at 4:51 PM knight91 <kni...@we...> wrote: > Python claims to be unable to import pyplot. Apart from that, it has been > running absolutely fine. > > I tried different versions of matplotlib, the one provided in my package > manager (apt-get) and two (stable & last stable) releases compiled from > source. I reinstalled all packages containting "python" on my system > (Ubuntu > 14.04 LTS). This error still occurs and prevents me from using pyplot. > > What should I try next? > > Python 2.7.6 (default, Jun 22 2015, 17:58:13) > [GCC 4.8.2] on linux2 > >>> from matplotlib import pyplot > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in > <module> > import matplotlib.colorbar > File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in > <module> > import matplotlib.collections as collections > File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, in > <module> > import matplotlib.backend_bases as backend_bases > File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 50, > in > <module> > import matplotlib.textpath as textpath > File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in > <module> > import matplotlib.font_manager as font_manager > File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1356, > in <module> > _rebuild() > File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1341, > in _rebuild > fontManager = FontManager() > File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1008, > in __init__ > self.afmlist = createFontList(self.afmfiles, fontext='afm') > File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 563, > in > createFontList > font = afm.AFM(fh) > File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in > __init__ > parse_afm(fh) > File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in > parse_afm > dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh) > File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in > _parse_char_metrics > bbox = _to_list_of_floats(vals[3][2:]) > File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in > _to_list_of_floats > return [_to_float(val) for val in s.split()] > ValueError: invalid literal for float(): 19# > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: knight91 <kni...@we...> - 2015-08-07 20:50:52
|
Python claims to be unable to import pyplot. Apart from that, it has been running absolutely fine. I tried different versions of matplotlib, the one provided in my package manager (apt-get) and two (stable & last stable) releases compiled from source. I reinstalled all packages containting "python" on my system (Ubuntu 14.04 LTS). This error still occurs and prevents me from using pyplot. What should I try next? Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 >>> from matplotlib import pyplot Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 24, in <module> import matplotlib.colorbar File "/usr/lib/pymodules/python2.7/matplotlib/colorbar.py", line 29, in <module> import matplotlib.collections as collections File "/usr/lib/pymodules/python2.7/matplotlib/collections.py", line 23, in <module> import matplotlib.backend_bases as backend_bases File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 50, in <module> import matplotlib.textpath as textpath File "/usr/lib/pymodules/python2.7/matplotlib/textpath.py", line 11, in <module> import matplotlib.font_manager as font_manager File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1356, in <module> _rebuild() File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1341, in _rebuild fontManager = FontManager() File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1008, in __init__ self.afmlist = createFontList(self.afmfiles, fontext='afm') File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 563, in createFontList font = afm.AFM(fh) File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 342, in __init__ parse_afm(fh) File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 330, in parse_afm dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh) File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 203, in _parse_char_metrics bbox = _to_list_of_floats(vals[3][2:]) File "/usr/lib/pymodules/python2.7/matplotlib/afm.py", line 69, in _to_list_of_floats return [_to_float(val) for val in s.split()] ValueError: invalid literal for float(): 19# -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Error-when-importing-pyplot-from-matplotlib-invalid-literal-for-float-19-tp46000.html Sent from the matplotlib - users mailing list archive at Nabble.com. |