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

Showing 6 results of 6

From: Jean-Luc S. <jls...@ed...> - 2015年07月06日 23:19:21
We are pleased to announce the fourth public release of HoloViews,
a Python package for simplifying the exploration of scientific data:
 http://holoviews.org
HoloViews provides composable, sliceable, declarative data
structures for building even complex visualizations easily.
The goal of HoloViews is to let your data just visualize itself,
allowing you to work with large datasets as easily as you work
with simple datatypes at the Python prompt.
You can obtain the new version using conda or pip:
 conda install -c ioam holoviews
 pip install --upgrade 'holoviews[recommended]'
This release includes a substantial number of new features and
API improvements, most of which have been suggested by our growing
userbase:
- Major optimizations throughout, both for working with HoloViews
 data structures and for visualization.
- Improved widget appearance and greatly reduced flickering
 issues when interactively exploring data in the browser.
- Improved handling of unicode and LaTeX text throughout,
 using Python 3's better unicode support (when available).
- New Polygons, ErrorBars, and Spread Element types.
- Support for multiple matplotlib backends (vanilla matplotlib, mpld3
 and nbagg) with support for other plotting systems (such as Bokeh)
 in development. Easily switching between backends allows you to take
 advantage of the unique features of each one, such as good SVG/PDF
 output, interactive zooming and panning, or 3D viewpoint control.
- Streamlined the API based on user feedback; now even more things
 "just work". This includes new, easy to use constructors for
 common Element types as well as easy conversion between them.
- More customizability of plot and style options, including easier
 control over font sizes, legend positions, background color, and
 multiple color bars. Polar projections now supported throughout.
- More flexible and customizable Layouts, allowing the user to
 define blank spaces (using the Empty object) as well as more
 control over positioning and aspect ratios.
- Support for a holoviews.rc file, integration with IPython Notebook
 interact widgets, improvements to the Pandas interface, easy
 saving and loading of data via pickling, and much more.
And of course we have fixed a number of bugs found by our very
dedicated users; please keep filing Github issues if you find any!
For the full list of changes, see:
 https://github.com/ioam/holoviews/releases
HoloViews remains freely available under a BSD license, is Python 2
and 3 compatible, and has minimal external dependencies, making it
easy to integrate into your workflow. Try out the extensive tutorials
at holoviews.org today, and check out our upcoming SciPy and EuroSciPy
talks in Austin and Cambridge (or read the paper at http://goo.gl/NH9FTB)!
Philipp Rudiger
Jean-Luc R. Stevens
James A. Bednar
The University of Edinburgh
School of Informatics
-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
From: Neal B. <ndb...@gm...> - 2015年07月06日 13:15:54
Christian Alis wrote:
> Have you tried making the string unicode?
> 
> ax.set_xlabel (u' ')
> 
> 
------------------------------------------------------------------------------
Oh, thanks. That works now on py2 and py3.
From: Christian A. <ia...@gm...> - 2015年07月06日 13:05:07
Have you tried making the string unicode?
ax.set_xlabel (u' ')
From: Neal B. <ndb...@gm...> - 2015年07月06日 12:50:12
This code runs on python3, but on python2 I get:
Traceback (most recent call last):
 File "per_vs_lambda.py", line 35, in <module>
 ax.set_xlabel (' ')
 File "/usr/lib64/python2.7/site-packages/matplotlib/axes/_axes.py", line 
179, in set_xlabel
 return self.xaxis.set_label_text(xlabel, fontdict, **kwargs)
 File "/usr/lib64/python2.7/site-packages/matplotlib/axis.py", line 1480, 
in set_label_text
 self.label.set_text(label)
 File "/usr/lib64/python2.7/site-packages/matplotlib/text.py", line 1028, 
in set_text
 self._text = '%s' % (s,)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: 
ordinal not in range(128)
#!/usr/bin/python
# -*- coding: utf-8 -*-
data='''carriers,lambda,per
1,7,1.3e-4
1,8,3.0e-4
1,9,.0014
8,7,4.8e-4
8,8,1.3e-3
8,9,.0075
'''
import pandas as pd
try:
 from StringIO import StringIO
except ImportError:
 from io import StringIO
df = pd.read_csv (StringIO (data))
g = df.groupby ('carriers')
import matplotlib.pyplot as plt
import matplotlib as mpl
#mpl.rcParams['font.family'] = 'stix'
mpl.rc('font', family='DejaVu Sans')
#mpl.rc('font', family='stix')
import itertools
markers = itertools.cycle(['o','s','v']) 
fig = plt.figure() 
ax = fig.add_subplot(111)
for c, stuff in g:
 plt.semilogy (stuff['lambda'].values, stuff['per'].values, 
label='carriers=%s'%c, marker=next(markers))
plt.legend (loc='best')
ax.set_xlabel (' ') <<< this invisible character is a small greek lambda
ax.set_ylabel ('per')
plt.grid(which='major', linestyle='solid')
plt.grid(which='minor', linestyle='dashed') 
plt.savefig ('per_vs_lambda.pdf')
From: Neal B. <ndb...@gm...> - 2015年07月06日 12:42:29
Neal Becker wrote:
> Using mpl 1.4.3 on Fedora 22, I'm trying to use stix font (so I can render
> the unicode lambda label on the x-axis). I have every fedora package
> related to 'stix', I think. It displays ok in qtagg4, but if I try to save
> to pdf if fails with
> 
> RuntimeError Traceback (most recent call
> last) <ipython-input-2-7dee58c07264> in <module>()
> ----> 1 exec(open(r'/usr/tmp/python-8710q1Y.py').read()) # PYTHON-MODE
> 
> <string> in <module>()
> 
> /usr/lib64/python3.4/site-packages/matplotlib/pyplot.py in savefig(*args,
> **kwargs)
> 575 def savefig(*args, **kwargs):
> 576 fig = gcf()
> --> 577 res = fig.savefig(*args, **kwargs)
> 578 draw() # need this if 'transparent=True' to reset colors
> 579 return res
> 
> /usr/lib64/python3.4/site-packages/matplotlib/figure.py in savefig(self,
> *args, **kwargs)
> 1474 self.set_frameon(frameon)
> 1475
> -> 1476 self.canvas.print_figure(*args, **kwargs)
> 1477
> 1478 if frameon:
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backend_bases.py in
> print_figure(self, filename, dpi, facecolor, edgecolor, orientation,
> format, **kwargs)
> 2209 orientation=orientation,
> 2210 bbox_inches_restore=_bbox_inches_restore,
> -> 2211 **kwargs)
> 2212 finally:
> 2213 if bbox_inches and restore_bbox:
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> print_pdf(self, filename, **kwargs)
> 2489 file.endStream()
> 2490 else: # we opened the file above; now
> finish
> it off
> -> 2491 file.close()
> 2492
> 2493
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> close(self)
> 523 self.endStream()
> 524 # Write out the various deferred objects
> --> 525 self.writeFonts()
> 526 self.writeObject(self.alphaStateObject,
> 527 dict([(val[0], val[1])
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> writeFonts(self)
> 626 chars = self.used_characters.get(stat_key)
> 627 if chars is not None and len(chars[1]):
> --> 628 fonts[Fx] = self.embedTTF(realpath, chars[1])
> 629 self.writeObject(self.fontObject, fonts)
> 630
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> embedTTF(self, filename, characters)
> 1101
> 1102 if fonttype == 3:
> -> 1103 return embedTTFType3(font, characters, descriptor)
> 1104 elif fonttype == 42:
> 1105 return embedTTFType42(font, characters, descriptor)
> 
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in
> embedTTFType3(font, characters, descriptor)
> 887 # actual outlines)
> 888 rawcharprocs = ttconv.get_pdf_charprocs(
> --> 889 filename.encode(sys.getfilesystemencoding()),
> glyph_ids)
> 890 charprocs = {}
> 891 for charname, stream in six.iteritems(rawcharprocs):
> 
> RuntimeError: TrueType font is missing table
> 
forgot to attach the code.
#!/usr/bin/python
# -*- coding: utf-8 -*-
data='''carriers,lambda,per
1,7,1.3e-4
1,8,3.0e-4
1,9,.0014
8,7,4.8e-4
8,8,1.3e-3
8,9,.0075
'''
import pandas as pd
try:
 from StringIO import StringIO
except ImportError:
 from io import StringIO
df = pd.read_csv (StringIO (data))
g = df.groupby ('carriers')
import matplotlib.pyplot as plt
import matplotlib as mpl
#mpl.rcParams['font.family'] = 'stix'
mpl.rc('font', family='DejaVu Sans')
#mpl.rc('font', family='stix')
import itertools
markers = itertools.cycle(['o','s','v']) 
fig = plt.figure() 
ax = fig.add_subplot(111)
for c, stuff in g:
 plt.semilogy (stuff['lambda'].values, stuff['per'].values, 
label='carriers=%s'%c, marker=next(markers))
plt.legend (loc='best')
ax.set_xlabel (' ')
ax.set_ylabel ('per')
plt.grid(which='major', linestyle='solid')
plt.grid(which='minor', linestyle='dashed') 
plt.savefig ('per_vs_lambda.pdf')
From: Neal B. <ndb...@gm...> - 2015年07月06日 12:26:31
Using mpl 1.4.3 on Fedora 22, I'm trying to use stix font (so I can render 
the unicode lambda label on the x-axis). I have every fedora package 
related to 'stix', I think. It displays ok in qtagg4, but if I try to save 
to pdf if fails with
RuntimeError Traceback (most recent call last)
<ipython-input-2-7dee58c07264> in <module>()
----> 1 exec(open(r'/usr/tmp/python-8710q1Y.py').read()) # PYTHON-MODE
<string> in <module>()
/usr/lib64/python3.4/site-packages/matplotlib/pyplot.py in savefig(*args, 
**kwargs)
 575 def savefig(*args, **kwargs):
 576 fig = gcf()
--> 577 res = fig.savefig(*args, **kwargs)
 578 draw() # need this if 'transparent=True' to reset colors
 579 return res
/usr/lib64/python3.4/site-packages/matplotlib/figure.py in savefig(self, 
*args, **kwargs)
 1474 self.set_frameon(frameon)
 1475 
-> 1476 self.canvas.print_figure(*args, **kwargs)
 1477 
 1478 if frameon:
/usr/lib64/python3.4/site-packages/matplotlib/backend_bases.py in 
print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, 
**kwargs)
 2209 orientation=orientation,
 2210 bbox_inches_restore=_bbox_inches_restore,
-> 2211 **kwargs)
 2212 finally:
 2213 if bbox_inches and restore_bbox:
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
print_pdf(self, filename, **kwargs)
 2489 file.endStream()
 2490 else: # we opened the file above; now finish 
it off
-> 2491 file.close()
 2492 
 2493 
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
close(self)
 523 self.endStream()
 524 # Write out the various deferred objects
--> 525 self.writeFonts()
 526 self.writeObject(self.alphaStateObject,
 527 dict([(val[0], val[1])
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
writeFonts(self)
 626 chars = self.used_characters.get(stat_key)
 627 if chars is not None and len(chars[1]):
--> 628 fonts[Fx] = self.embedTTF(realpath, chars[1])
 629 self.writeObject(self.fontObject, fonts)
 630 
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
embedTTF(self, filename, characters)
 1101 
 1102 if fonttype == 3:
-> 1103 return embedTTFType3(font, characters, descriptor)
 1104 elif fonttype == 42:
 1105 return embedTTFType42(font, characters, descriptor)
/usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in 
embedTTFType3(font, characters, descriptor)
 887 # actual outlines)
 888 rawcharprocs = ttconv.get_pdf_charprocs(
--> 889 filename.encode(sys.getfilesystemencoding()), 
glyph_ids)
 890 charprocs = {}
 891 for charname, stream in six.iteritems(rawcharprocs):
RuntimeError: TrueType font is missing table

Showing 6 results of 6

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