Re: [Matplotlib-users] TrueType font is missing table
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') -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] TrueType font is missing table
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 -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] unicode trouble
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') -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] unicode trouble
Christian Alis wrote: Have you tried making the string unicode? ax.set_xlabel (u' ') -- Oh, thanks. That works now on py2 and py3. -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] common text label on legend?
Is there some way I can add a short text to the legend box? Rather than having label='foo=0' label='foo=1' ... I'd like to just put 'foo' say at the top of the legend box. Any thoughts? -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Fwd: [matplotlib-devel] RFC: candidates for a new default colormap
I vote for D, although I like matlab's new default even better -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] configure subplots feature request
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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] synchronize magnification of subplots?
Paul Hobson wrote: I only have the notebook to mes around in, but the following works for me: %matplotlib nbagg import matplotlib.pyplot as plt fig, ax = plt.subplots(nrows=2, sharex=True, sharey=True) On Tue Feb 03 2015 at 4:07:26 PM Neal Becker ndbeck...@gmail.com wrote: I have 2 subplots, 2 rows 1 col. They have the same x-axis. I'd like to be able to zoom in on both plots together. Using qt4agg, there is a zoom icon, but it seems to operated on each subplot separately. Thanks for the quick replies! This works fine. -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] synchronize magnification of subplots?
I have 2 subplots, 2 rows 1 col. They have the same x-axis. I'd like to be able to zoom in on both plots together. Using qt4agg, there is a zoom icon, but it seems to operated on each subplot separately. -- -- Those who don't understand recursion are doomed to repeat it -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 2 overlaid plots with grid??
I need to overlay 2 different plots. They will share an x-axis, but will have 2 different y axis with 2 different sets of units. I want one y-axis on left and one on right. But to make it harder, I want a grid. That means, there are either 2 different grids, which is ugly, or one plot has to be scaled vertically so that the same y grid can be shared between them. Anyone know how to do this? -- -- Those who don't understand recursion are doomed to repeat it -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] violin plot
As others noted, seaborn does very nice violin plots. I was hoping the mpl version would replace that. On Thu, Aug 28, 2014 at 8:04 AM, Thomas Caswell tcasw...@gmail.com wrote: We also welcome PRs! Adding that feature should be pretty straight forward. Iirc it should be a matter of adding an extra key to the dictionary and a conditional to draw the lines if those keys exist. Tom On Aug 27, 2014 4:57 PM, Arnaldo Russo arnaldoru...@gmail.com wrote: Hi Neal, I don't know if you need exclusively matplotlib tools to apply your violin plot, but seaborn package [1, 2] do this very well. I hope you enjoy it! Cheers, Arnaldo. [1] http://web.stanford.edu/~mwaskom/software/seaborn/examples/violinplots.html [2] https://github.com/mwaskom/seaborn --- *Arnaldo D'Amaral Pereira Granja Russo* Lab. de Estudos dos Oceanos e Clima Instituto de Oceanografia - FURG 2014-08-27 12:15 GMT-03:00 Neal Becker ndbeck...@gmail.com: I'm pleased to see violinplot added to mpl-1.4. One question. I might like to annotate with some statistic. Like boxplot can show quantiles. I might like to show either quantiles, or some other statistic (3 sigma) on my violinplot. After all, violinplot is advertised as an improved boxplot, but it seems to be missing this feature. -- -- Those who don't understand recursion are doomed to repeat it -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- *Those who don't understand recursion are doomed to repeat it* -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] mpl-1.4 openblas
Using pip (so default build), while building mpl-1.4 on fedora-20 linux, I noticed: openblas_info: libraries not found in ['/usr/local/lib64', '/usr/local/lib', '/usr/lib64', '/usr/lib', '/usr/lib/'] NOT AVAILABLE openblas is installed. Should I be concerned? -- -- Those who don't understand recursion are doomed to repeat it -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] violin plot
I'm pleased to see violinplot added to mpl-1.4. One question. I might like to annotate with some statistic. Like boxplot can show quantiles. I might like to show either quantiles, or some other statistic (3 sigma) on my violinplot. After all, violinplot is advertised as an improved boxplot, but it seems to be missing this feature. -- -- Those who don't understand recursion are doomed to repeat it -- Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Upgrading matplotlib
I use pip install --user whatever -- HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing Easy Data Exploration http://p.sf.net/sfu/hpccsystems ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] basic pgf test fails
Neal Becker wrote: I tried the simple example, but all examples I try choke on savefig ('blah.pdf') This is fedora20 linux, with pretty modern, complete texlive. I tried rm'ing tex-cache example.py # -*- coding: utf-8 -*- import matplotlib as mpl mpl.use(pgf) pgf_with_rc_fonts = { font.family: serif, font.serif: [], # use latex default serif font font.sans-serif: [DejaVu Sans], # use a specific sans-serif font } mpl.rcParams.update(pgf_with_rc_fonts) import matplotlib.pyplot as plt plt.figure(figsize=(4.5,2.5)) plt.plot(range(5)) plt.text(0.5, 3., serif) plt.text(0.5, 2., monospace, family=monospace) plt.text(2.5, 2., sans-serif, family=sans-serif) plt.text(2.5, 1., comic sans, family=Comic Sans MS) plt.xlabel(uµ is not $\\mu$) plt.tight_layout(.5) -- python testpgf.py /usr/lib64/python2.7/site-packages/matplotlib/__init__.py:758: UserWarning: Found matplotlib configuration in ~/.matplotlib/. To conform with the XDG base directory standard, this configuration location has been deprecated on Linux, and the new location is now '/home/nbecker/.config'/matplotlib/. Please move your configuration there to ensure that matplotlib will continue to find it in the future. _get_xdg_config_dir()) Traceback (most recent call last): File testpgf.py, line 20, in module plt.tight_layout(.5) File /usr/lib64/python2.7/site-packages/matplotlib/pyplot.py, line 1255, in tight_layout fig.tight_layout(pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect) File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 1600, in tight_layout renderer = get_renderer(self) File /usr/lib64/python2.7/site-packages/matplotlib/tight_layout.py, line 222, in get_renderer renderer = canvas.get_renderer() File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 925, in get_renderer return RendererPgf(self.figure, None, dummy=True) File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 409, in __init__ self.latexManager = LatexManagerFactory.get_latex_manager() File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 223, in get_latex_manager new_inst = LatexManager() File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 305, in __init__ cwd=self.tmpdir) File /usr/lib64/python2.7/subprocess.py, line 711, in __init__ errread, errwrite) File /usr/lib64/python2.7/subprocess.py, line 1308, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Figured it out. problem is xelatex was not installed. Too bad the traceback can't be more clear on this. -- Is your legacy SCM system holding you back? Join Perforce May 7 to find out: #149; 3 signs your SCM is hindering your productivity #149; Requirements for releasing software faster #149; Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] basic pgf test fails
https://github.com/matplotlib/matplotlib/issues/3051 -- Is your legacy SCM system holding you back? Join Perforce May 7 to find out: #149; 3 signs your SCM is hindering your productivity #149; Requirements for releasing software faster #149; Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] basic pgf test fails
I tried the simple example, but all examples I try choke on savefig ('blah.pdf') This is fedora20 linux, with pretty modern, complete texlive. I tried rm'ing tex-cache example.py # -*- coding: utf-8 -*- import matplotlib as mpl mpl.use(pgf) pgf_with_rc_fonts = { font.family: serif, font.serif: [], # use latex default serif font font.sans-serif: [DejaVu Sans], # use a specific sans-serif font } mpl.rcParams.update(pgf_with_rc_fonts) import matplotlib.pyplot as plt plt.figure(figsize=(4.5,2.5)) plt.plot(range(5)) plt.text(0.5, 3., serif) plt.text(0.5, 2., monospace, family=monospace) plt.text(2.5, 2., sans-serif, family=sans-serif) plt.text(2.5, 1., comic sans, family=Comic Sans MS) plt.xlabel(uµ is not $\\mu$) plt.tight_layout(.5) -- python testpgf.py /usr/lib64/python2.7/site-packages/matplotlib/__init__.py:758: UserWarning: Found matplotlib configuration in ~/.matplotlib/. To conform with the XDG base directory standard, this configuration location has been deprecated on Linux, and the new location is now '/home/nbecker/.config'/matplotlib/. Please move your configuration there to ensure that matplotlib will continue to find it in the future. _get_xdg_config_dir()) Traceback (most recent call last): File testpgf.py, line 20, in module plt.tight_layout(.5) File /usr/lib64/python2.7/site-packages/matplotlib/pyplot.py, line 1255, in tight_layout fig.tight_layout(pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect) File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 1600, in tight_layout renderer = get_renderer(self) File /usr/lib64/python2.7/site-packages/matplotlib/tight_layout.py, line 222, in get_renderer renderer = canvas.get_renderer() File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 925, in get_renderer return RendererPgf(self.figure, None, dummy=True) File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 409, in __init__ self.latexManager = LatexManagerFactory.get_latex_manager() File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 223, in get_latex_manager new_inst = LatexManager() File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 305, in __init__ cwd=self.tmpdir) File /usr/lib64/python2.7/subprocess.py, line 711, in __init__ errread, errwrite) File /usr/lib64/python2.7/subprocess.py, line 1308, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory -- Is your legacy SCM system holding you back? Join Perforce May 7 to find out: #149; 3 signs your SCM is hindering your productivity #149; Requirements for releasing software faster #149; Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Which api to learn?
I've never used matlab (and hope never to have to). But I've been using pyplot api for mpl for quite a while. Is there any good reason to move to the native mpl api and drop pyplot? I ask because as I understand, pyplot is intended as a matlab workalike, and since I never learned matlab I have no need for that crutch. OTOH, I'm quite used to the pyplot api at this point. -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Which api to learn?
Paul Hobson wrote: The only pyplot function I let myself use is plt.subplots() to quickly create the Figure and Axes objects. From that point on, I operate on those objects directly. Frankly, it reads almost exactly like pyplot code, but it is a *lot* more clear what's going on. ... Actually this is going to be harder than I thought. Looking around for some examples of API not using pyplot I'm not turning up much. If I look at http://matplotlib.org/api/index.html I quickly find myself staring at pyplot docs, and if I look at a few http://matplotlib.org/examples/index.html I see pyplot examples. Where would I find non-pyplot examples and docs? -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] twinx vs. subplothost
I've seen examples for 2 axis using twinx, and examples using subplothost. Any reason to choose one over the other? -- Subversion Kills Productivity. Get off Subversion Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] don't understand interactive mode
I am trying to update a figure in a loop: import matplotlib.pyplot as plt plt.ion() plt.figure (1) def c2r (z): return z.real, z.imag plt.hexbin (*c2r (run_ofdm (xconst_pred)[:opt.used]), mincnt=1) plt.draw() But no figure appears on the screen. What am I doing wrong? This is using using Qt4Agg (I think, that's what's in my matplotlibrc) -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] hexbin runtime warnings
Any idea what could cause hexbin to issue runtime warnings and then draw a blank figure? /home/nbecker/.local/lib/python3.3/site-packages/matplotlib/axes.py:6524: RuntimeWarning: invalid value encountered in true_divide x = (x - xmin) / sx /home/nbecker/.local/lib/python3.3/site-packages/matplotlib/axes.py:6539: RuntimeWarning: invalid value encountered in less bdist = (d1 d2) -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] multipage pdf + pgf?
I'm using import matplotlib as mpl mpl.use ('pdf') from matplotlib.backends.backend_pdf import PdfPages ... self.pdf = PdfPages(file_name) ... self.pdf.savefig (self.fig) plt.close() ... pdf.close() This works fine, but now I want to try pgf. If I add: from matplotlib.backends.backend_pgf import FigureCanvasPgf mpl.backend_bases.register_backend('pdf', FigureCanvasPgf) at the beginning, then it chokes on the savefig (self.fig): Traceback (most recent call last): File ./plot_stuff2.py, line 362, in module the_plot.finish (args, opt, time, res) File ./plot_stuff2.py, line 157, in finish self.pdf.savefig (self.fig) File /home/nbecker/.local/lib/python2.7/site- packages/matplotlib/backends/backend_pdf.py, line 2297, in savefig figure.savefig(self, format='pdf', **kwargs) File /home/nbecker/.local/lib/python2.7/site-packages/matplotlib/figure.py, line 1421, in savefig self.canvas.print_figure(*args, **kwargs) File /home/nbecker/.local/lib/python2.7/site- packages/matplotlib/backend_bases.py, line 2220, in print_figure **kwargs) File /home/nbecker/.local/lib/python2.7/site- packages/matplotlib/backend_bases.py, line 2060, in _print_method return print_method(*args, **kwargs) File /home/nbecker/.local/lib/python2.7/site- packages/matplotlib/backends/backend_pgf.py, line 869, in print_pdf raise ValueError(filename must be a path or a file-like object) ValueError: filename must be a path or a file-like object I know I had this working some time in the past, what's the trick to making multi-page pdf with pgf? -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] hg-git + hg2.8?
Didn't seem to work for me. I tried pip install --user hg-git hg clone https://github.com/scipy/scipy abort: HTTP Error 406: Not Acceptable So how about using hg-git just locally? hg clone scipy scipy.hg ** Unknown exception encountered with possibly-broken third-party extension hg- git ** which supports versions 2.3.1 of Mercurial. ** Please disable hg-git and try your action again. ** If that fixes the bug please report it to https://bitbucket.org/durin42/hg-git/issues ** Python 2.7.5 (default, Nov 12 2013, 16:18:42) [GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] ** Mercurial Distributed SCM (version 2.8) ** Extensions loaded: hgk, rebase, highlight, hg-git Traceback (most recent call last): File /usr/bin/hg, line 38, in module mercurial.dispatch.run() File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 28, in run sys.exit((dispatch(request(sys.argv[1:])) or 0) 255) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 69, in dispatch ret = _runcatch(req) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 133, in _runcatch return _dispatch(req) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 806, in _dispatch cmdpats, cmdoptions) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 585, in runcommand ret = _runcommand(ui, options, cmd, d) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 897, in _runcommand return checkargs() File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 868, in checkargs return cmdfunc() File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 803, in lambda d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File /usr/lib64/python2.7/site-packages/mercurial/util.py, line 512, in check return func(*args, **kwargs) File /usr/lib64/python2.7/site-packages/mercurial/commands.py, line 1282, in clone branch=opts.get('branch')) File /usr/lib64/python2.7/site-packages/mercurial/hg.py, line 372, in clone destpeer.local().clone(srcpeer, heads=revs, stream=stream) File /usr/lib64/python2.7/site-packages/mercurial/localrepo.py, line 2431, in clone return self.pull(remote, heads) File /home/nbecker/.local/lib/python2.7/site-packages/hggit/hgrepo.py, line 14, in pull return git.fetch(remote.path, heads) File /home/nbecker/.local/lib/python2.7/site-packages/hggit/git_handler.py, line 204, in fetch refs = self.fetch_pack(remote, heads) File /home/nbecker/.local/lib/python2.7/site-packages/hggit/git_handler.py, line 1037, in fetch_pack f, commit = self.git.object_store.add_pack() ValueError: too many values to unpack -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] hg-git + hg2.8?
Sorry, this was posted to the wrong group Neal Becker wrote: Didn't seem to work for me. I tried pip install --user hg-git hg clone https://github.com/scipy/scipy abort: HTTP Error 406: Not Acceptable So how about using hg-git just locally? hg clone scipy scipy.hg ** Unknown exception encountered with possibly-broken third-party extension hg- git ** which supports versions 2.3.1 of Mercurial. ** Please disable hg-git and try your action again. ** If that fixes the bug please report it to https://bitbucket.org/durin42/hg-git/issues ** Python 2.7.5 (default, Nov 12 2013, 16:18:42) [GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] ** Mercurial Distributed SCM (version 2.8) ** Extensions loaded: hgk, rebase, highlight, hg-git Traceback (most recent call last): File /usr/bin/hg, line 38, in module mercurial.dispatch.run() File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 28, in run sys.exit((dispatch(request(sys.argv[1:])) or 0) 255) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 69, in dispatch ret = _runcatch(req) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 133, in _runcatch return _dispatch(req) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 806, in _dispatch cmdpats, cmdoptions) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 585, in runcommand ret = _runcommand(ui, options, cmd, d) File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 897, in _runcommand return checkargs() File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 868, in checkargs return cmdfunc() File /usr/lib64/python2.7/site-packages/mercurial/dispatch.py, line 803, in lambda d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File /usr/lib64/python2.7/site-packages/mercurial/util.py, line 512, in check return func(*args, **kwargs) File /usr/lib64/python2.7/site-packages/mercurial/commands.py, line 1282, in clone branch=opts.get('branch')) File /usr/lib64/python2.7/site-packages/mercurial/hg.py, line 372, in clone destpeer.local().clone(srcpeer, heads=revs, stream=stream) File /usr/lib64/python2.7/site-packages/mercurial/localrepo.py, line 2431, in clone return self.pull(remote, heads) File /home/nbecker/.local/lib/python2.7/site-packages/hggit/hgrepo.py, line 14, in pull return git.fetch(remote.path, heads) File /home/nbecker/.local/lib/python2.7/site-packages/hggit/git_handler.py, line 204, in fetch refs = self.fetch_pack(remote, heads) File /home/nbecker/.local/lib/python2.7/site-packages/hggit/git_handler.py, line 1037, in fetch_pack f, commit = self.git.object_store.add_pack() ValueError: too many values to unpack -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] nicely formatted exponential in title
I tried: plt.title (r'$\omega=%s$' % omega), where omega=-1e-5. The title says: omega=-1e-05 with the 'e' in italics, and the whole thing generally ugly. What I'd like to see is what TeX would do for $1 \times 10^{5}$. I know mpl already can nicely format numbers for axis. Can I somehow use that mechanism to nicely format numbers in my title (or other places)? -- Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] multi colored text
I have a blue line plot and a green line plot. I'd like to add some figtext at the bottom, and I'd like the text colors to match the plot colors. So I'd have some text in blue and some in green. figtext only allows one color I could use 2 figtext, but then I have to manually find coordinate positions for the text. That's ugly. It would be nice if we had a TeX-like approach, where I could create a green text object and a blue text object, then assemble them by stacking boxes. Any ideas? -- Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 1.3 + xkcd + latex
It appears that latex doesn't work with xkcd? I put for example: self.ax.set_xlabel ('$E_s/N_0$') Which go rendered with the '$' signs and not as latex And my vertical axis was labeled as: $\mathdefault{10^{3}}$ ... -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 1.3 + xkcd + latex
Michael Droettboom wrote: The built-in mathtext support does. (I can put xkcd() at the top of the mathtext_demo.py example and all is well). It does not work when |text.usetex| is True (when using external TeX). But in that case, it should have thrown an exception: |Traceback (most recent call last): File mathtext_demo.py, line 9, in module xkcd() File /home/mdboom/python/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7- linux-x86_64.egg/matplotlib/pyplot.py, line 293, in xkcd xkcd mode is not compatible with text.usetex = True) RuntimeError: xkcd mode is not compatible with text.usetex = True| Mike On 10/18/2013 07:24 AM, Neal Becker wrote: It appears that latex doesn't work with xkcd? I put for example: self.ax.set_xlabel ('$E_s/N_0 ) Which go rendered with the ' signs and not as latex And my vertical axis was labeled as: $\mathdefault{10^{3}}$ ... Strange. I don't have anything about usetex in the script, or in my .matplotlibrc - all it has is: backend : Qt4Agg mathtext.fontset: stix -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 1.3 + xkcd + latex
This example shows the error on my platform - the xlabel is not rendered with tex but instead the '$' are printed: import numpy as np import matplotlib.pyplot as plt plt.xkcd() fig = fig = plt.figure() ax = fig.add_subplot(111) plt.plot (np.arange (10), 2*np.arange(10)) ax.set_xlabel ('$E_{s}/N_{0}$') plt.show() Michael Droettboom wrote: The built-in mathtext support does. (I can put xkcd() at the top of the mathtext_demo.py example and all is well). It does not work when |text.usetex| is True (when using external TeX). But in that case, it should have thrown an exception: |Traceback (most recent call last): File mathtext_demo.py, line 9, in module xkcd() File /home/mdboom/python/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7- linux-x86_64.egg/matplotlib/pyplot.py, line 293, in xkcd xkcd mode is not compatible with text.usetex = True) RuntimeError: xkcd mode is not compatible with text.usetex = True| Mike On 10/18/2013 07:24 AM, Neal Becker wrote: It appears that latex doesn't work with xkcd? I put for example: self.ax.set_xlabel ('$E_s/N_0 ) Which go rendered with the ' signs and not as latex And my vertical axis was labeled as: $\mathdefault{10^{3}}$ ... -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 1.3 + xkcd + latex
Michael Droettboom wrote: On 10/18/2013 08:20 AM, Neal Becker wrote: Michael Droettboom wrote: The built-in mathtext support does. (I can put xkcd() at the top of the mathtext_demo.py example and all is well). It does not work when |text.usetex| is True (when using external TeX). But in that case, it should have thrown an exception: |Traceback (most recent call last): File mathtext_demo.py, line 9, in module xkcd() File /home/mdboom/python/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7- linux-x86_64.egg/matplotlib/pyplot.py, line 293, in xkcd xkcd mode is not compatible with text.usetex = True) RuntimeError: xkcd mode is not compatible with text.usetex = True| Mike On 10/18/2013 07:24 AM, Neal Becker wrote: It appears that latex doesn't work with xkcd? I put for example: self.ax.set_xlabel ('$E_s/N_0 ) Which go rendered with the ' signs and not as latex And my vertical axis was labeled as: $\mathdefault{10^{3}}$ ... Strange. I don't have anything about usetex in the script, or in my .matplotlibrc - all it has is: backend : Qt4Agg mathtext.fontset: stix Puzzling. Do you have a matplotlibrc in the current working directory? No. Also tried removing .matplotlibrc (in ~/.matplotlib). -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 1.3 + xkcd + latex
Neal Becker wrote: This example shows the error on my platform - the xlabel is not rendered with tex but instead the '$' are printed: import numpy as np import matplotlib.pyplot as plt plt.xkcd() fig = fig = plt.figure() ax = fig.add_subplot(111) plt.plot (np.arange (10), 2*np.arange(10)) ax.set_xlabel ('$E_{s}/N_{0}$') plt.show() And without plt.xkcd() the tex is rendered correctly -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 1.3 + xkcd + latex
I am using mpl 1.3, python 2.7.3, 64-bit linux (fedora 19) Andrew Dawson wrote: For what it is worth I see behaviour identical to Neal. I'm using a development version of matplotlib (v1.4.x, sorry I don't know the hash of the installed version) on 64-bit Linux (Ubuntu 12.04) and Python 2.7.3. That probably doesn't help much, except to show that this is not specific to just Neal! Andrew On 18 October 2013 14:40, Michael Droettboom md...@stsci.edu wrote: This is really puzzling. What version of matplotlib are you running, what platform, and what version of Python? Your example works just fine for me. Mike On 10/18/2013 08:40 AM, Neal Becker wrote: Neal Becker wrote: This example shows the error on my platform - the xlabel is not rendered with tex but instead the '$' are printed: import numpy as np import matplotlib.pyplot as plt plt.xkcd() fig = fig = plt.figure() ax = fig.add_subplot(111) plt.plot (np.arange (10), 2*np.arange(10)) ax.set_xlabel ('$E_{s}/N_{0}$') plt.show() And without plt.xkcd() the tex is rendered correctly -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- _ |\/|o _|_ _. _ | | \.__ __|__|_|_ _ _ ._ _ | ||(_| |(_|(/_| |_/|(_)(/_|_ |_|_)(_)(_)| | | http://www.droettboom.com -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] native latex rendering:
Maybe look into pgf. It's slow, but looks good. http://matplotlib.org/users/pgf.html -- Own the Future-Intel(R) Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] real time plotting
I want to update a plot in real time. I did some goog search, and saw various answers. Trouble is, they aren't working. Here's a typical example: import matplotlib.pyplot as plt import numpy as np fig=plt.figure() plt.axis([0,1000,0,1]) i=0 x=list() y=list() while i 1000: temp_y=np.random.random() x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() If I run this, it draws nothing. This is my matplotlibrc: backend : Qt4Agg mathtext.fontset: stix -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] real time plotting
Tried with/and without plt.ion(), no difference. Nothing is drawn. When I kill it with C-c, briefly a window is flashed. import matplotlib as mpl import matplotlib.pyplot as plt plt.ion() import numpy as np fig=plt.figure() plt.axis([0,1000,0,1]) i=0 x=list() y=list() while i 1000: temp_y=np.random.random() x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() On Mon, Mar 11, 2013 at 9:55 AM, Francesco Montesano franz.berges...@gmail.com wrote: Dear Neal, 2013/3/11 Neal Becker ndbeck...@gmail.com I want to update a plot in real time. I did some goog search, and saw various answers. Trouble is, they aren't working. Here's a typical example: import matplotlib.pyplot as plt import numpy as np fig=plt.figure() plt.axis([0,1000,0,1]) i=0 x=list() y=list() while i 1000: temp_y=np.random.random() x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() If I run this, it draws nothing. This is my matplotlibrc: backend : Qt4Agg mathtext.fontset: stix do you use interactive mode? (plt.ion() before creating the figure) Francesco -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] real time plotting
mpl is 1.2.0 Fedora linux On Mon, Mar 11, 2013 at 9:57 AM, Neal Becker ndbeck...@gmail.com wrote: Tried with/and without plt.ion(), no difference. Nothing is drawn. When I kill it with C-c, briefly a window is flashed. import matplotlib as mpl import matplotlib.pyplot as plt plt.ion() import numpy as np fig=plt.figure() plt.axis([0,1000,0,1]) i=0 x=list() y=list() while i 1000: temp_y=np.random.random() x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() On Mon, Mar 11, 2013 at 9:55 AM, Francesco Montesano franz.berges...@gmail.com wrote: Dear Neal, 2013/3/11 Neal Becker ndbeck...@gmail.com I want to update a plot in real time. I did some goog search, and saw various answers. Trouble is, they aren't working. Here's a typical example: import matplotlib.pyplot as plt import numpy as np fig=plt.figure() plt.axis([0,1000,0,1]) i=0 x=list() y=list() while i 1000: temp_y=np.random.random() x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() If I run this, it draws nothing. This is my matplotlibrc: backend : Qt4Agg mathtext.fontset: stix do you use interactive mode? (plt.ion() before creating the figure) Francesco -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] real time plotting
I added fig.canvas.show(). It still does nothing. If I add mpl.use ('GTK'), now it seems to be doing realtime plotting. import matplotlib as mpl import matplotlib.pyplot as plt plt.ion() import numpy as np fig=plt.figure() plt.axis([0,1000,0,1]) i=0 x=list() y=list() fig.canvas.show() while i 1000: temp_y=np.random.random() x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() On Mon, Mar 11, 2013 at 10:35 AM, David Hoese dho...@gmail.com wrote: Oops forgot to change the subject line. On 3/11/13 9:34 AM, David Hoese wrote: You likely need to show() the canvas. I usually do this by calling fig.canvas.show() before the for loop. Since you are using a Qt4 backend the canvas used by the figure is a QWidget, the basic component of a Qt4 GUI. I don't know if there is a more matplotlib specific way of doing this, but when dealing with a larger system this is how I do it. I would also add a sleep (from time import sleep) of a couple seconds for testing to make sure you are getting through the entire for loop before you can see it. Please CC in any replies, thanks. -Dave On 3/11/13 8:58 AM, ndbeck...@gmail.com wrote: I want to update a plot in real time. I did some goog search, and saw various answers. Trouble is, they aren't working. Here's a typical example: import matplotlib.pyplot as plt import numpy as np fig=plt.figure() plt.axis([0,1000,0,1]) i=0 x=list() y=list() while i 1000: temp_y=np.random.random() x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() If I run this, it draws nothing. This is my matplotlibrc: backend : Qt4Agg mathtext.fontset: stix -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] another failed attempt (realtime)
According to other examples I see on the web, use of 'relim' and 'autoscale_view' should result in rescaling and drawing new axes. Doesn't. Unless I explicity call ax.axis ([...]) I don't get any rescaling. Here's an example: import matplotlib as mpl mpl.use ('GTK') import matplotlib.pyplot as plt plt.ion() import numpy as np fig=plt.figure() ax = fig.add_subplot(111) x_values = [0] ax.axis ([0, 10, -1, 1]) y_values = [0] i=0 x=list() y=list() while i 1000: x.append (i) y.append (2*i) line, = plt.plot (x, y, 'x-') ##ax.axis ([min(x),max(x),min(y),max(y)]) ax.relim() # update ax.viewLim using the new dataLim ax.autoscale_view() plt.draw() i+=1 -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] another failed attempt (realtime)
Doesn't matter, still doesn't rescale without calling ax.axis On Mon, Mar 11, 2013 at 1:48 PM, Sterling Smith smit...@fusion.gat.comwrote: Neal, You might try mpl.use('GTKAgg') as I have seen problems with lone GTK. Also you might change this in your .matplotlibrc file if possible. -Sterling On Mar 11, 2013, at 10:43AM, Neal Becker wrote: According to other examples I see on the web, use of 'relim' and 'autoscale_view' should result in rescaling and drawing new axes. Doesn't. Unless I explicity call ax.axis ([...]) I don't get any rescaling. Here's an example: import matplotlib as mpl mpl.use ('GTK') import matplotlib.pyplot as plt plt.ion() import numpy as np fig=plt.figure() ax = fig.add_subplot(111) x_values = [0] ax.axis ([0, 10, -1, 1]) y_values = [0] i=0 x=list() y=list() while i 1000: x.append (i) y.append (2*i) line, = plt.plot (x, y, 'x-') ##ax.axis ([min(x),max(x),min(y),max(y)]) ax.relim() # update ax.viewLim using the new dataLim ax.autoscale_view() plt.draw() i+=1 -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] real time plotting
I go through a compute loop that takes maybe a few seconds per pass, then plot a new point on the graph. Do I have to? No - I thought mpl was supposed to do this and wanted to learn how. If it really doesn't work I'll do something else. I don't think animation is correct here - I had the impression animation is where my update would be run as a callback, with a main loop that calls me periodically. Could that fit the model I described, where a lengthy computation produces a new value every few/10s of seconds? On Mon, Mar 11, 2013 at 1:55 PM, David Hoese dho...@gmail.com wrote: Someone may have to correct me, but I think this has to do with the Qt4 event loop and it not being run properly. When you get into real time plotting it can get kind of tricky. In your case (I got the same results). I have made real-time PyQt4 GUIs before and have always used separate QThreads and Qt signals/slots to update the plot. I've never used GTK so I'm not sure why that worked vs Qt, I would think they would use similar principles but matplotlib does some magic behind the scenes sometimes. You can see different results if you comment out the while loop and import the module into your python/ipython interpreter. After doing this you'll see the figure pop up (you don't even need the fig.canvas.show() for this part if interactive mode is on. I went one step further and turned the while loop into a function: def one_iter(i): # Contents of while loop Calling this in the interpreter shows the figure updating after each call, but running in a loop (even with sleep) won't show any updates until the loop is done. In my opinion you have a few choices that really depend on your programming comfort level: 1. Don't make a real-time plot. Do you really need a real-time plot that updates from some external source? 2. Maybe you should look at the matplotlib animation functionality ( http://matplotlib.org/api/animation_api.html). I like this tutorial: http://jakevdp.github.com/blog/2012/08/18/matplotlib-animation-tutorial/. This won't get you a real-time GUI exactly, but it can help if what you're doing isn't too complicated. It can also be nice for making videos of plot animations. 3. If you need a GUI with multiple plots and you need for future feature creep, I would research making PyQt4 GUIs, QThreads, Qt signals and slots, and putting matplotlib figures into a PyQt4 GUI. This is complex if you are not familiar with GUI programming and will take a while. Sorry I couldn't be of more help, but it really depends on what exactly you are doing. Mainly, what do you mean by real-time? Do you really mean animation? Let me know what you come up with, I'm interested. -Dave P.S. Why use a while loop? You can do the same thing with: for i in range(1000): # Do stuff On 3/11/13 10:34 AM, Neal Becker wrote: I added fig.canvas.show(). It still does nothing. If I add mpl.use ('GTK'), now it seems to be doing realtime plotting. import matplotlib as mpl import matplotlib.pyplot as plt plt.ion() import numpy as np fig=plt.figure() plt.axis([0,1000,0,1]) i=0 x=list() y=list() fig.canvas.show() while i 1000: temp_y=np.random.random() x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() On Mon, Mar 11, 2013 at 10:35 AM, David Hoese dho...@gmail.com wrote: Oops forgot to change the subject line. On 3/11/13 9:34 AM, David Hoese wrote: You likely need to show() the canvas. I usually do this by calling fig.canvas.show() before the for loop. Since you are using a Qt4 backend the canvas used by the figure is a QWidget, the basic component of a Qt4 GUI. I don't know if there is a more matplotlib specific way of doing this, but when dealing with a larger system this is how I do it. I would also add a sleep (from time import sleep) of a couple seconds for testing to make sure you are getting through the entire for loop before you can see it. Please CC in any replies, thanks. -Dave On 3/11/13 8:58 AM, ndbeck...@gmail.com wrote: I want to update a plot in real time. I did some goog search, and saw various answers. Trouble is, they aren't working. Here's a typical example: import matplotlib.pyplot as plt import numpy as np fig=plt.figure() plt.axis([0,1000,0,1]) i=0 x=list() y=list() while i 1000: temp_y=np.random.random() x.append(i) y.append(temp_y) plt.scatter(i,temp_y) i+=1 plt.draw() If I run this, it draws nothing. This is my matplotlibrc: backend : Qt4Agg mathtext.fontset: stix -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full
Re: [Matplotlib-users] xelatex with pdf multipage
Neal Becker wrote: Objective: produce multi-page pdfs using xelatex so I can have advanced latex and stix fonts (using xits package) I've used pdf multipage with the recipe: import matplotlib as mpl mpl.use ('pdf') import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages pdf = PdfPages('test_uw3.pdf') for page in ... fig = plt.figure() pdf.savefig (fig) plt.close() pdf.close() Now I'm interested in using xelatex (to use stix fonts). So I saw the I should use pgf If I add: from matplotlib.backends.backend_pgf import FigureCanvasPgf matplotlib.backend_bases.register_backend('pdf', FigureCanvasPgf) as suggested by http://matplotlib.org/users/pgf.html I get an error: Traceback (most recent call last): File ./read_hist3.py, line 121, in module pdf.savefig (fig) File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py, line 2258, in savefig figure.savefig(self, format='pdf', **kwargs) File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 1363, in savefig self.canvas.print_figure(*args, **kwargs) File /usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py, line 2093, in print_figure **kwargs) File /usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py, line 1943, in _print_method return print_method(*args, **kwargs) File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 830, in print_pdf raise ValueError(filename must be a path or a file-like object) ValueError: filename must be a path or a file-like object Any ideas? The best thing I've come up with so far is this, which will write out each page to a pdf file, then use subprocess to call 'pdfunite' to join the pdfs. I like the xits-math + xits - it gives a much more unified look so the text and math fonts match. Only problems: It's extremely slow The resulting pdf has duplicate embedded fonts import matplotlib as mpl mpl.use ('pgf') import numpy as np import matplotlib.pyplot as plt pgf_with_custom_preamble = { font.family: serif, # use serif/main font for text elements text.usetex: True,# use inline math for ticks pgf.rcfonts: False, # don't setup fonts from rc parameters 'pgf.texsystem' : 'lualatex', pgf.preamble: [ r'\usepackage{fontspec,xunicode}', r\usepackage{unicode-math}, # unicode math setup r\setmathfont{xits-math.otf}, r'\usepackage{cancel}', r'\usepackage{xcolor}', r'\renewcommand{\CancelColor}{\color{red}}', r'\setmainfont{xits}', ] } mpl.rcParams.update(pgf_with_custom_preamble) for ... plt.savefig ('xxx.pdf') subprocess.call (['pdfunite'] + files + ['test_uw4.pdf']) -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] xelatex with pdf multipage
Objective: produce multi-page pdfs using xelatex so I can have advanced latex and stix fonts (using xits package) I've used pdf multipage with the recipe: import matplotlib as mpl mpl.use ('pdf') import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages pdf = PdfPages('test_uw3.pdf') for page in ... fig = plt.figure() pdf.savefig (fig) plt.close() pdf.close() Now I'm interested in using xelatex (to use stix fonts). So I saw the I should use pgf If I add: from matplotlib.backends.backend_pgf import FigureCanvasPgf matplotlib.backend_bases.register_backend('pdf', FigureCanvasPgf) as suggested by http://matplotlib.org/users/pgf.html I get an error: Traceback (most recent call last): File ./read_hist3.py, line 121, in module pdf.savefig (fig) File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py, line 2258, in savefig figure.savefig(self, format='pdf', **kwargs) File /usr/lib64/python2.7/site-packages/matplotlib/figure.py, line 1363, in savefig self.canvas.print_figure(*args, **kwargs) File /usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py, line 2093, in print_figure **kwargs) File /usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py, line 1943, in _print_method return print_method(*args, **kwargs) File /usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pgf.py, line 830, in print_pdf raise ValueError(filename must be a path or a file-like object) ValueError: filename must be a path or a file-like object Any ideas? -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 3d performance question
I'm using fedora (17) linux. I notice on complicated 3d plot, interactive performance can get sluggish. I'm using nouveau driver now, but wondering if installing nvidia driver will improve mpl 3d performance? Does mpl use opengl? -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Why is pip not mentioned in the Installation Documentation?
The problem is that pip packages something as a dir where easy_install packages as a file, or vice-versa. Then when you update, cpio will fail (doesn't know how to replace a dir with a file, or vice-versa). Next, the entire installation will abort Leaving you with a mess. I understand it's possible to manually then fix this mess using (some obscure) yum incantations, but I don't recall what. Usually at this point I wipe the disc. This has happened to me multiple times on multiple machines, and was discussed at some length on fedora-dev list maybe 1 year ago. The basic message was that I shouldn't use pip to install into the system dirs. But even using pip --user is not answer, because pip will see that e.g., matplotlib wants a newer version of pytz, and will attempt to remove the system pytz (and fail and abort). The only reliable approach is virtualenv. Not really very satisfactory. On Tue, Nov 20, 2012 at 6:02 AM, Mathew Topper mathew.top...@ed.ac.ukwrote: Hi Neal, Is that due to conflicting package versions? I haven't suffered any particular issues like this yet, but it seems to me that pip would be improved if it interacted better with the environment it was in. How hard would it be to get pip to interact with yum and apt, for instance, to get valid binaries and/or devel files? I can't help thinking that Latex packaging is very similar, in that linux distributions often struggle to keep up, which I guess is why TexLive started. And then to complicate matters further, our sys admin said he didn't like pip as he would rather generate RPMs, in order that there is not a lot of work to do for system rebuilds in our labs. I found pypi2rpm, but that looks pretty bleeding edge and I think I'm getting out of my depth as a humble scientist. Mat On 19/11/12 12:59, Neal Becker wrote: Mathew Topper wrote: Hi, I'm interested to know why the pip package manager is not more widely supported for installation of python packages like matplotlib? Matplotlib seems to be particularly slowly updated in the Fedora repositories, for example, so I often find that a source installation is necessary. I know this isn't especially difficult for the experienced user, but surely using something like pip would make this process for accessible for all users of python packages, particularly those that do not receive much attention from the big distribution maintainers? Yet, pip doesn't get a mention on the installation documentation of matplotlib or many other python packs. I would love to hear anyone's thoughts on this matter. Many Thanks, Mat It is dangerous to use pip on fedora, it may result in your next attempt to update the system failing horribly. If you use it, try to install with --user. Unfortunately, this often won't work because pip will then complain when attempting to remove a system version of some dep. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!http://p.sf.net/sfu/zoho_dev2dev_nov ___ Matplotlib-users mailing listMatplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 School fax: +44 (0)131 650 6554 mathew.top...@ed.ac.uk http://www.see.ed.ac.uk The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Why is pip not mentioned in the Installation Documentation?
python setup.py install won't cause that issue. Also, easy_install doesn't cause the same issue. OTOH, I'm not sure what easy_install does in the case of deps. If you use pip install --user it will try (and fail) to remove old versions of deps from system. I don't know what easy_install does in this case. I have also had issues where python setup.py install will install everything into /usr/lib, while fedora packaging will try to install arch-dep parts under e.g., /usr/lib64. I have many times wound up with 2 versions of things that way. On Tue, Nov 20, 2012 at 7:04 AM, Mathew Topper mathew.top...@ed.ac.ukwrote: Neal, thanks for the warning. I found the thread of your discussion here actually: http://lists.fedoraproject.org/pipermail/devel/2012-February/162496.html It's very interesting. My feeling would be that a PyPI fedora repository would make the most sense - much like the current Fedora TexLive2012 testing repository - but obviously this is no small job. python setup.py install doesn't have similar issues, I take it? Mat On 20/11/12 11:40, Neal Becker wrote: The problem is that pip packages something as a dir where easy_install packages as a file, or vice-versa. Then when you update, cpio will fail (doesn't know how to replace a dir with a file, or vice-versa). Next, the entire installation will abort Leaving you with a mess. I understand it's possible to manually then fix this mess using (some obscure) yum incantations, but I don't recall what. Usually at this point I wipe the disc. This has happened to me multiple times on multiple machines, and was discussed at some length on fedora-dev list maybe 1 year ago. The basic message was that I shouldn't use pip to install into the system dirs. But even using pip --user is not answer, because pip will see that e.g., matplotlib wants a newer version of pytz, and will attempt to remove the system pytz (and fail and abort). The only reliable approach is virtualenv. Not really very satisfactory. On Tue, Nov 20, 2012 at 6:02 AM, Mathew Topper mathew.top...@ed.ac.ukwrote: Hi Neal, Is that due to conflicting package versions? I haven't suffered any particular issues like this yet, but it seems to me that pip would be improved if it interacted better with the environment it was in. How hard would it be to get pip to interact with yum and apt, for instance, to get valid binaries and/or devel files? I can't help thinking that Latex packaging is very similar, in that linux distributions often struggle to keep up, which I guess is why TexLive started. And then to complicate matters further, our sys admin said he didn't like pip as he would rather generate RPMs, in order that there is not a lot of work to do for system rebuilds in our labs. I found pypi2rpm, but that looks pretty bleeding edge and I think I'm getting out of my depth as a humble scientist. Mat On 19/11/12 12:59, Neal Becker wrote: Mathew Topper wrote: Hi, I'm interested to know why the pip package manager is not more widely supported for installation of python packages like matplotlib? Matplotlib seems to be particularly slowly updated in the Fedora repositories, for example, so I often find that a source installation is necessary. I know this isn't especially difficult for the experienced user, but surely using something like pip would make this process for accessible for all users of python packages, particularly those that do not receive much attention from the big distribution maintainers? Yet, pip doesn't get a mention on the installation documentation of matplotlib or many other python packs. I would love to hear anyone's thoughts on this matter. Many Thanks, Mat It is dangerous to use pip on fedora, it may result in your next attempt to update the system failing horribly. If you use it, try to install with --user. Unfortunately, this often won't work because pip will then complain when attempting to remove a system version of some dep. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!http://p.sf.net/sfu/zoho_dev2dev_nov ___ Matplotlib-users mailing listMatplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Dr. Mathew Topper Institute for Energy Systems School of Engineering The University of Edinburgh Faraday Building The King’s Buildings Edinburgh EH9 3JL Tel: +44 (0)131 650 5570 %2B44%20%280%29131%20650%205570 School fax: +44 (0)131 650 6554 %2B44%20%280%29131%20650%206554 mathew.top...@ed.ac.uk http://www.see.ed.ac.uk The University of Edinburgh is a charitable body
Re: [Matplotlib-users] Why is pip not mentioned in the Installation Documentation?
Mathew Topper wrote: Hi, I'm interested to know why the pip package manager is not more widely supported for installation of python packages like matplotlib? Matplotlib seems to be particularly slowly updated in the Fedora repositories, for example, so I often find that a source installation is necessary. I know this isn't especially difficult for the experienced user, but surely using something like pip would make this process for accessible for all users of python packages, particularly those that do not receive much attention from the big distribution maintainers? Yet, pip doesn't get a mention on the installation documentation of matplotlib or many other python packs. I would love to hear anyone's thoughts on this matter. Many Thanks, Mat It is dangerous to use pip on fedora, it may result in your next attempt to update the system failing horribly. If you use it, try to install with --user. Unfortunately, this often won't work because pip will then complain when attempting to remove a system version of some dep. -- Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] automating-xkcd-diagrams-transforming-serious-to-funny
http://blog.wolfram.com/2012/10/05/automating-xkcd-diagrams-transforming- serious-to-funny/ I wonder if mpl has anything along these lines? -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] legend(loc='best') not so great
I tried a scatterplot with legend(loc='best'), but the legend appears on the upper right, covering a data point. There is nothing anywhere in the graph on the upper left, which is where 'best' should go. -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] legend(loc='best') not so great
OK, I've attached my sanitized example Benjamin Root wrote: On Tue, Sep 11, 2012 at 9:29 AM, Neal Becker ndbeck...@gmail.com wrote: I tried a scatterplot with legend(loc='best'), but the legend appears on the upper right, covering a data point. There is nothing anywhere in the graph on the upper left, which is where 'best' should go. A small, self-contained example would be most useful. The logic for 'best' isn't the greatest, but it should work in most cases. If you could provide an example of where this blatantly breaks, it might uncover a bug. Cheers! Ben Root import numpy as np import matplotlib.pyplot as plt data_csv = '''\ mod,rate,esno Z,2/3,3.09 Z,3/4,4.12 Z,4/5,4.75 Z,5/6,5.2 Z,8/9,6.21 Z,9/10,6.46 W,3/5,5.78 W,2/3,6.81 W,3/4,7.97 W,4/5,8.92 W,5/6,9.55 W,8/9,10.72 W,9/10,11 ''' from StringIO import StringIO from pandas import read_csv u = read_csv (StringIO (data_csv)) from fractions import Fraction bit_per_sym = u.mod.map ({'Z' : 2, 'W' : 3}) bps_per_hz = bit_per_sym * u.rate.map (lambda s: float(Fraction(s))) / 1.05 u['X'] = bps_per_hz V = u.esno - 10*np.log10(bit_per_sym*u.rate.map (lambda s: float(Fraction(s u['V'] = V stuff = u.groupby (['mod']) import itertools colors = itertools.cycle(['r','g','b','c','y','m','k']) markers = itertools.cycle(['o','s','v']) for case,res in stuff: print 'case:', case print 'res:', res plt.scatter (res.V, res.X, color=colors.next(), marker=markers.next(), label=case) for pts in zip (res.rate, res.V, res.X): print pts plt.annotate (pts[0], xy=(pts[1],pts[2])) F_csv = '''\ mod,rate,F,V Z,2/3,1.2375,2.0 Z,3/4,1.25,2.6 Z,8/9,1.24,4.0 W,2/3,1.3125,5 W,4/5,1.3125,6.4 ''' v = read_csv (StringIO (F_csv)) bit_per_sym = v.mod.map ({'Z' : 2, 'W' : 3}) bps_per_hz = bit_per_sym * v.F * v.rate.map (lambda s: float(Fraction(s))) / 1.05 v['X'] = bps_per_hz stuff = v.groupby (['mod']) for case,res in stuff: print 'case:', case print 'res:', res plt.scatter (res.V, res.X, color=colors.next(), marker=markers.next(), label='F-'+case) for pts in zip (res.rate, res.V, res.X, res.F): print pts plt.annotate ('%s,%s'%(pts[0],pts[3]), xy=(pts[1],pts[2])) plt.grid() plt.legend(loc='best') 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Exception RuntimeError: 'sys.meta_path must be a list of import hooks
Any ideas what this is about? No traceback, just this message: Exception RuntimeError: 'sys.meta_path must be a list of import hooks' in bound method plot.__del__ of __main__.plot object at 0x2cf5c10 ignored -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Exception RuntimeError: 'sys.meta_path must be a list of import hooks
Neal Becker wrote: Any ideas what this is about? No traceback, just this message: Exception RuntimeError: 'sys.meta_path must be a list of import hooks' in bound method plot.__del__ of __main__.plot object at 0x2cf5c10 ignored Maybe I found it. I had an object managing my plot, which had a __del__ which called pdf.close(). Probably this destructor was called too late. I now explicitly call del on my object, and the problem is gone. -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] howto get minor ticks?
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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] pdf file output name too restrictive?
Using this code: self.pdf = PdfPages('%s.%s.pdf' % (name, str(date.today( Trying to output a pdf with the name results.abs_aci=[10.0, nan, 10.0].rate=['2/3', '4/5', '2/3'].2012-03-12.pdf produces this error IOError: [Errno 2] No such file or directory: results.abs_aci=[10.0, nan, 10.0].rate=['2/3', '4/5', '2/3'].2012-03-12.pdf Changing the file name to just 'test1.pdf' produces no error. -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] resize a plot to make room
I have a figure with a semilogy plot. I need to make more room on the bottom to add a bunch of figtext, which is 4 lines of text. With the defaults, the text overprints the x-axis. What is a suggested way to fix this? (Ideally, mpl would calculate the appropriate sizes for me so things don't overprint). -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Add some explanatory text to the legend
I have a legend that is going to have some abbreviations to compactly indicate the properties of different lines in a graph. I'd like to add a little 'key' to explain what the notation means. Any suggestion? -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Add some explanatory text to the legend
Ethan Swint wrote: On 1/25/2012 1:32 PM, Neal Becker wrote: I have a legend that is going to have some abbreviations to compactly indicate the properties of different lines in a graph. I'd like to add a little 'key' to explain what the notation means. Any suggestion? I was thinking of the annotate functionality, but on second thought, I think you are looking for something like http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.text Regards, Ethan Thanks. Since the text is to explain the legend, I wanted to put it as part of the legend box - either above or below the rest of the legend. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem with annotate
Yes, setting annotation_clip=False did fix it. I will try to send a minimal example. ATM, my example is not at all minimal, but I suspect that you can easily reproduce this with any plot where the x axis is set so that the rightmost point is on the edge of the graph, and annotation is set to right justified (which should make the annotation visible, within the bounds of the plot) Jae-Joon Lee wrote: Can you post an standalone example? Maybe you want to set the *annotation_clip* parameter to False? http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.annotate Regards, -JJ On Fri, Dec 2, 2011 at 10:19 PM, Neal Becker ndbeck...@gmail.com wrote: Using horizontalalignment='right', it seems that if a point lies on the right edge of the plot, the annotation does not appear, even though (since the text should be right aligned), the text would have been on the plot and be visible. Any workaround? -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/ -- Cloud Services Checklist: Pricing and Packaging Optimization This white paper is intended to serve as a reference, checklist and point of discussion for anyone considering optimizing the pricing and packaging model of a cloud services business. Read Now! http://www.accelacomm.com/jaw/sfnl/114/51491232/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] problem with annotate
Using horizontalalignment='right', it seems that if a point lies on the right edge of the plot, the annotation does not appear, even though (since the text should be right aligned), the text would have been on the plot and be visible. Any workaround? -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] X Error since upgrade to 1.1.0
Using interactively (via emacs/ipython), on closing a plot window I see: X Error: BadWindow (invalid Window parameter) 3 Major opcode: 20 (X_GetProperty) Resource id: 0x5802e1b -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] X Error since upgrade to 1.1.0
linux fedora 15 x86_64 backend : Qt4Agg Now it's gone away, after killing the *Python* buffer and restarting the python process. If it comes back I'll try to get more info. John Hunter wrote: On Thu, Oct 13, 2011 at 8:03 AM, Neal Becker ndbeck...@gmail.com wrote: Using interactively (via emacs/ipython), on closing a plot window I see: X Error: BadWindow (invalid Window parameter) 3 Major opcode: 20 (X_GetProperty) Resource id: 0x5802e1b Could you give us some more information. What operating system? Which matplotlib backend and GUI version? What version of ipython? What, exactly do you do to reproduce the problem? -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] how would you do this (animated bargraph)
I just put together an animated bargraph to show results from a realtime process. I used this as an example: http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4.html The tricky part for me was that in the original design, there was a realtime process running. I have to write some information to my hardware (at a rate of about 1/360ms). To do this, I have a kernel driver that uses 'read' to tell the user space when an interrupt has occurred, which is when the user space should write new information to the hardware. So I don't know how or if this could be hooked into qt event processing. Just for a quick-and-dirty demo, I just removed the realtime processing from the user-space and put it in the kernel driver, so now my bargraph display can simply update on a periodic timer, and the userspace code has no realtime requirement. But this is just a kludge. So I wonder how other's would solve this? I'm thinking it would be either: 1) multi-process 2) multi-thread 3) 1 process, but somehow hook my realtime events into qt's event loop. For #3, my device driver has a filedescriptor, that could use select to detect the interrupt (rather than blocking read call). #1 and #2 seem complicated. -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] how would you do this (animated bargraph) (Neal Becker)
David Hoese wrote: Neal, I do something similar to this where data that I'm plotting in a 2D line plot comes from a UDP socket and some memory mapped files. To accomplish the live updating I have a mix of your #2 and #3. I have a main GUI thread that displays the plots, then I have a second thread that gets data from a python generator and signals the GUI thread when that new data has arrived. Inside the generator is where I have socket communications and select calls. Hope this helps. Haven't tried it, but I did notice QSocketNotifier, which sounds like it may be what I need if I want to hook into qt event loop to implement as single-thread, single-process. -Dave On 9/30/11 9:10 AM, matplotlib-users-requ...@lists.sourceforge.net wrote: Message: 4 Date: Fri, 30 Sep 2011 07:37:49 -0400 From: Neal Beckerndbeck...@gmail.com Subject: [Matplotlib-users] how would you do this (animated bargraph) To:matplotlib-users@lists.sourceforge.net Message-ID:j649me$ug4$1...@dough.gmane.org Content-Type: text/plain; charset=ISO-8859-1 I just put together an animated bargraph to show results from a realtime process. I used this as an example: http://matplotlib.sourceforge.net/examples/animation/animation_blit_qt4.html The tricky part for me was that in the original design, there was a realtime process running. I have to write some information to my hardware (at a rate of about 1/360ms). To do this, I have a kernel driver that uses 'read' to tell the user space when an interrupt has occurred, which is when the user space should write new information to the hardware. So I don't know how or if this could be hooked into qt event processing. Just for a quick-and-dirty demo, I just removed the realtime processing from the user-space and put it in the kernel driver, so now my bargraph display can simply update on a periodic timer, and the userspace code has no realtime requirement. But this is just a kludge. So I wonder how other's would solve this? I'm thinking it would be either: 1) multi-process 2) multi-thread 3) 1 process, but somehow hook my realtime events into qt's event loop. For #3, my device driver has a filedescriptor, that could use select to detect the interrupt (rather than blocking read call). #1 and #2 seem complicated. -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 2 x-axes
Actually, though, I didn't want to plot 2 different sets of data as in that example, I want 1 set of data plotted with 2 different x-axis (different units). Any suggestion on modifying this example to accomplish this? import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid.parasite_axes import SubplotHost fig = plt.figure(figsize=(10,8)) host = SubplotHost(fig, 111) fig.add_subplot(host) parx = host.twiny() parx.axis[top].set_visible(False) offset = 0, -50 new_axisline = parx.get_grid_helper().new_fixed_axis parx.axis[bottom] = new_axisline(loc=bottom, axes=parx, offset=offset) parx.axis[bottom].label.set_visible(True) hplt, = host.plot(np.random.rand(100)) p2, = parx.plot(np.linspace(0,20,100), np.random.rand(100)*5.0, color='green') plt.show() -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 2 x-axes
Neal Becker wrote: Actually, though, I didn't want to plot 2 different sets of data as in that example, I want 1 set of data plotted with 2 different x-axis (different units). Any suggestion on modifying this example to accomplish this? import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid.parasite_axes import SubplotHost fig = plt.figure(figsize=(10,8)) host = SubplotHost(fig, 111) fig.add_subplot(host) parx = host.twiny() parx.axis[top].set_visible(False) offset = 0, -50 new_axisline = parx.get_grid_helper().new_fixed_axis parx.axis[bottom] = new_axisline(loc=bottom, axes=parx, offset=offset) parx.axis[bottom].label.set_visible(True) hplt, = host.plot(np.random.rand(100)) p2, = parx.plot(np.linspace(0,20,100), np.random.rand(100)*5.0, color='green') plt.show() OK, answer my own question. Just remove the line 'parx.plot(...'). I didn't realize that I'd get the second axis drawn without that plot call, but it works fine. -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 2 x-axes
Gökhan Sever wrote: Hi, The code below should create a properly placed 2nd x-axis. You might need to adjust the placement of the figure canvas to match into the window. import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid.parasite_axes import SubplotHost fig = plt.figure(figsize=(10,8)) host = SubplotHost(fig, 111) fig.add_subplot(host) parx = host.twiny() parx.axis[top].set_visible(False) offset = 0, -50 new_axisline = parx.get_grid_helper().new_fixed_axis parx.axis[bottom] = new_axisline(loc=bottom, axes=parx, offset=offset) parx.axis[bottom].label.set_visible(True) hplt, = host.plot(np.random.rand(100)) p2, = parx.plot(np.linspace(0,20,100), np.random.rand(100)*5.0, color='green') plt.show() There is also another example at: http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#axisartist- with-parasiteaxes Hope this helps. Yes, that's very helpful. Just one thing. How would I get a bit more bottom margin on the main figure to leave more room for the extra axis? I'm using this as an example. I experimented with plt.subplots_adjust, which seems like it might do the right thing. Is this the 'best' approach? (I really don't know what all these methods do, just guessing) import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid.parasite_axes import SubplotHost from matplotlib.backends.backend_pdf import PdfPages pdf = PdfPages('results.pdf') fig = plt.figure(figsize=(10,8)) host = SubplotHost(fig, 111) ax = fig.add_subplot(host) plt.subplots_adjust (bottom=0.1) parx = host.twiny() parx.axis[top].set_visible(False) offset = 0, -30 new_axisline = parx.get_grid_helper().new_fixed_axis parx.axis[bottom] = new_axisline(loc=bottom, axes=parx, offset=offset) parx.axis[bottom].label.set_visible(True) hplt, = host.plot(np.linspace(0,20,100), np.random.rand(100)) plt.xlabel ('Es/No') p2, = parx.plot(np.linspace(0,20,100)-5, np.random.rand(100)*5.0, color='green') parx.set_xlabel ('$Eb_{i}/No$') #plt.show() pdf.savefig (fig) plt.close() pdf.close() -- Using storage to extend the benefits of virtualization and iSCSI Virtualization increases hardware utilization and delivers a new level of agility. Learn what those decisions are and how to modernize your storage and backup environments for virtualization. http://www.accelacomm.com/jaw/sfnl/114/51434361/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 2 x-axes
Jae-Joon Lee wrote: On Sun, Sep 11, 2011 at 10:16 PM, Neal Becker ndbeck...@gmail.com wrote: Yes, that's very helpful. Just one thing. How would I get a bit more bottom margin on the main figure to leave more room for the extra axis? I'm using this as an example. I experimented with plt.subplots_adjust, which seems like it might do the right thing. Is this the 'best' approach? (I really don't know what all these methods do, just guessing) Yes, you need to fiddle with subplots_adjust command. The current development branch of matplotlib (not yet released) has a new function tight_layout, which does this automatically for you. Regards, -JJ Looking forward to that. Any idea of an ETA for a release? -- Using storage to extend the benefits of virtualization and iSCSI Virtualization increases hardware utilization and delivers a new level of agility. Learn what those decisions are and how to modernize your storage and backup environments for virtualization. http://www.accelacomm.com/jaw/sfnl/114/51434361/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 2 x-axes
I have a semilog plot. I'd like to add a second x axis (maybe below the existing one, or else maybe on top of graph). This second x axis is simply describing the same existing data, in different units. For example imagine a plot of x - time in seconds y - velocity x2 - time in minutes -- Why Cloud-Based Security and Archiving Make Sense Osterman Research conducted this study that outlines how and why cloud computing security and archiving is rapidly being adopted across the IT space for its ease of implementation, lower cost, and increased reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] 2 x-axes
Neal Becker wrote: I have a semilog plot. I'd like to add a second x axis (maybe below the existing one, or else maybe on top of graph). This second x axis is simply describing the same existing data, in different units. For example imagine a plot of x - time in seconds y - velocity x2 - time in minutes This almost works: fig = plt.figure() ax = fig.add_subplot(111) ... ax2 = ax.twiny() min_x, max_x = ax.get_xlim() ax2.set_xlim (min_x-1, max_x-1) except the 2nd x axis is on the top, and prints right on top of the title -- Why Cloud-Based Security and Archiving Make Sense Osterman Research conducted this study that outlines how and why cloud computing security and archiving is rapidly being adopted across the IT space for its ease of implementation, lower cost, and increased reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How do you Plot data generated by a python script?
surfcast23 wrote: I am fairly new to programing and have a question regarding matplotlib. I wrote a python script that reads in data from the outfile of another program then prints out the data from one column. f = open( 'myfile.txt','r') for line in f: if line != ' ': line = line.strip() # Strips end of line character columns = line.split() # Splits into coloumn mass = columns[8]# Column which contains mass values print(mass) What I now need to do is have matplotlib take the values printed in 'mass' and plot number versus mean mass. I have read the documents on the matplotlib website, but they don't really address how to get data from a script(or I just did not see it) If anyone can point me to some documentation that explains how I do this it would be really appreciated. Thanks in advance What I always do, is in my script I pickle the parameters used to run the script, and the results. Usually I save a pair of dicts, one of the parameters, and one of the results. Then to plot, just unpickle them and have at it. -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] update graph without blocking
Running from command line (not ipython), is there some way to add a plot and update display without blocking? I have an algorithm that should iteratively converge. I'd like to draw the result (a plot) after N iterations, continue computing, then draw after 2N, etc. Retaining the previous plots. Also, what if I wanted to erase previous plots? -- Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Font family ['cmb10'] not found
Fedora f15. What am I missing that causes this? /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['cmb10'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1252: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=12. Returning /usr/share/fonts/texlive-gfsdidot/GFSDidotBold.otf UserWarning) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['cmtt10'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['cmss10'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Font family ['cmb10'] not found
Looks like this is fixed by: mathtext.fontset: stix Neal Becker wrote: Fedora f15. What am I missing that causes this? /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['cmb10'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1252: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=12. Returning /usr/share/fonts/texlive-gfsdidot/GFSDidotBold.otf UserWarning) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['cmtt10'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['cmss10'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev -- uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] latex just produces gibberish
Darren Dale wrote: On Tue, May 17, 2011 at 2:05 PM, Neal Becker ndbeck...@gmail.com wrote: I have an old fedora 11 system. When I try to use latex math (e.g., $\mu=2$), it gives no error, but seems to produce gibberish (just ordinary ascii chars) in my pdf output. Any ideas how to debug? Try using raw strings. If that doesn't work, try submitting a short example. submitting an example won't help. The problem is with this installation. My question is, how can I try to debug it? -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] latex just produces gibberish
Michael Droettboom wrote: Are you setting text.usetex to True, or using matplotlib's built-in mathtext rendering? Can you attach an image? I've seen enough of these failure cases that I can often guess by looking at it ;) Mike On 05/18/2011 09:21 AM, Neal Becker wrote: Darren Dale wrote: On Tue, May 17, 2011 at 2:05 PM, Neal Beckerndbeck...@gmail.com wrote: I have an old fedora 11 system. When I try to use latex math (e.g., $\mu=2$), it gives no error, but seems to produce gibberish (just ordinary ascii chars) in my pdf output. Any ideas how to debug? Try using raw strings. If that doesn't work, try submitting a short example. submitting an example won't help. The problem is with this installation. My question is, how can I try to debug it? The simplest example is I made a legend that says: plot (...label=r'esno=%s,$\mu$=%.2fms'%(esno,0.001*hist.mean()... And \mu gets turned into an '=' sign I am not setting text.usetex to True AFAIK (no .matplotlibrc). I also note that there is no ~/.matplotlib/tex.cache on this machine. -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] show density in scatter
Using scatter, it seems less probably (numerous) points show just as much as more probable points. Can anyone suggest a good way to emphasize the more probable points? I was thinking maybe the easy way is just scale down the markers. Drawback may be too many points plotted. Colors would be nice, but I guess that would be more work? -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] show density in scatter
Eric Firing wrote: On 05/18/2011 09:01 AM, Neal Becker wrote: Using scatter, it seems less probably (numerous) points show just as much as more probable points. Can anyone suggest a good way to emphasize the more probable points? This is what hexbin is for, although it takes the additional step of showing points on a grid, not at their original precise locations. Eric Very nice! Thanks! -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] adding some text
I have several line graphs on a single plot. I'd like to indicate what is the mean of each of them (they are showing cumulative distributions). Each is a different color. I tried putting 'mean=xxx' into the legend. That works, but I think it's confusing. The legend normally displays independent variables, not results. I put vertical lines and then text, vertically, just below the x-axis giving the mean values. Not very clear. This is not really a technical question, but one of presentation style. How to convey this information? -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] multiple graphs on same scale
I asked this a while back, but never explained myself clearly. I'm using pdfpages to plot multiple graphs on multiple pages. I want the graphs to come out on the same scales. Would it be reasonable to try to autoscale them and yet come out on the same scale? Maybe would be easier to just do my own autoscaling? -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] scaling multiple plots same axis?
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). -- Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] some explanatory text with legend
Actually, I got nice results using: legend (title=blah blah...) Jae-Joon Lee wrote: The position of the legend is determined at drawing time, so it is a bit tricky to get it right. I recommend you to use annotate instead. ax = subplot(111) ax.plot([1,2,3], label=u=2,p=3) leg = ax.legend() ann = ax.annotate(Test 2, xy=(0.5, 1.), xycoords=leg.get_frame(), xytext=(0,10), textcoords=offset points, va=center, ha=left, ) ann.set_zorder(leg.get_zorder()+0.1) # the zorder of ann must be higher than leg so that the position of leg is known when ann gets drawn See here for some more details. http://matplotlib.sourceforge.net/users/annotations_guide.html#using-complex- coordinate-with-annotation Regards, -JJ On Fri, Mar 18, 2011 at 8:31 PM, Neal Becker ndbeck...@gmail.com wrote: My legend is going to have a series of entries that look like: u=2,p=3 u=1,p=4 ... I want to add some (short) text that explains what u and p are. I'm thinking to get the coordinates of the legend box so I can then annotate? How would I get the coordinates of the legend box? Or is there some better/easier way to do what I want? -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] some explanatory text with legend
My legend is going to have a series of entries that look like: u=2,p=3 u=1,p=4 ... I want to add some (short) text that explains what u and p are. I'm thinking to get the coordinates of the legend box so I can then annotate? How would I get the coordinates of the legend box? Or is there some better/easier way to do what I want? -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] No stix fonts?
/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXSizeOneSym'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXSizeThreeSym'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXSizeFourSym'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXSizeFiveSym'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXSizeTwoSym'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXNonUnicode'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) But I have stix fonts installed stix-pua-fonts-1.0.0-1.fc14.noarch stix-variants-fonts-1.0.0-1.fc14.noarch stix-fonts-doc-1.0.0-1.fc14.noarch stix-sizes-fonts-1.0.0-1.fc14.noarch stix-fonts-1.0.0-1.fc14.noarch stix-integrals-fonts-1.0.0-1.fc14.noarch What could be wrong? -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Why no STIX fonts?
I have several machines running fedora f14. 2 of them produce plots fine with STIX, but 1 doesn't, but gives: /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXSizeOneSym'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1252: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf UserWarning) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXSizeThreeSym'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) ... On that machine I have: Package stix-variants-fonts-1.0.0-1.fc14.noarch already installed and latest version Package stix-pua-fonts-1.0.0-1.fc14.noarch already installed and latest version Package stix-fonts-1.0.0-1.fc14.noarch already installed and latest version Package stix-fonts-doc-1.0.0-1.fc14.noarch already installed and latest version Package stix-sizes-fonts-1.0.0-1.fc14.noarch already installed and latest version Package stix-integrals-fonts-1.0.0-1.fc14.noarch already installed and latest version rpm -q python-matplotlib python-matplotlib-1.0.0-2.fc14.x86_64 Any ideas how to debug this? -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Why no STIX fonts?
Seems that deleting fontList.cache did it. Michael Droettboom wrote: You can try deleting matplotlib's font cache in ~/.matplotlib/fontList.cache. If that doesn't work, set the rcParam verbose.level to debug-annoying and send us the output... Mike On 01/14/2011 08:10 AM, Neal Becker wrote: I have several machines running fedora f14. 2 of them produce plots fine with STIX, but 1 doesn't, but gives: /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXSizeOneSym'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1252: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0. Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf UserWarning) /usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['STIXSizeThreeSym'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) ... On that machine I have: Package stix-variants-fonts-1.0.0-1.fc14.noarch already installed and latest version Package stix-pua-fonts-1.0.0-1.fc14.noarch already installed and latest version Package stix-fonts-1.0.0-1.fc14.noarch already installed and latest version Package stix-fonts-doc-1.0.0-1.fc14.noarch already installed and latest version Package stix-sizes-fonts-1.0.0-1.fc14.noarch already installed and latest version Package stix-integrals-fonts-1.0.0-1.fc14.noarch already installed and latest version rpm -q python-matplotlib python-matplotlib-1.0.0-2.fc14.x86_64 Any ideas how to debug this? -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] semilogy
Paul Ivanov wrote: Neal Becker, on 2011-01-05 08:19, wrote: I want to plot semilogy with major and minor grid. I tried: plt.grid(which='both') But 2 problems: 1) For semilogy, most of my viewers will expect to see 10 minor ticks/major tick. I got 5. How do I change it? Hi Neal, odd, it works here. (See attached image) In [1]: plt.semilogy(((np.random.rand(50)*9+1))) If your problem persists, can you provide a small example where this does not work? You might check the minor locator - make sure that it is base 10 Perhaps because my data covered a large range 10**-7 ... 10**0? I'll try some experiments. I had to force it with: fig.get_axes()[0].set_yticks ([a*(10**b) for b in xrange (-7,0) for a in xrange (1,10) ], minor=True) In [2]: plt.gca().yaxis.minor.locator._base Out[2]: 10.0 2) I'd like the major ticks to be solid lines, and minor ticks to be dashed. I got all dashed. In [3]: plt.grid(which='major', linestyle='solid') In [4]: plt.grid(which='minor', linestyle='dashed') -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] semilogy
I want to plot semilogy with major and minor grid. I tried: plt.grid(which='both') But 2 problems: 1) For semilogy, most of my viewers will expect to see 10 minor ticks/major tick. I got 5. How do I change it? 2) I'd like the major ticks to be solid lines, and minor ticks to be dashed. I got all dashed. -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] automatically choose different line markers
How can I automatically cycle through distinctive line markers? I want a semilog plot, composed of a number of lines. Each line should have a different color and marker. Cycling through the colors is automatic, but not the markers. BTW, shouldn't this behavior be the default? I would just like to say markers=True and get this behavior. -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] annotate x-axis
How should I put some text marking a position on the x-axis? -- Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Howto get horiz/vert grid
from pylab import semilogy, show, grid grid() semilogy (result[0]) This gave me just a vertical grid. What do I do to get both horiz and vert grids? -- Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, Big Spaceship. http://p.sf.net/sfu/creativitycat-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plot problem
pylab.plot (xaxis, log10 (the_sum)*10) where xaxis is numpy array, and log10(the_sum)*10 is my own class that is a valid python sequence (it is a c++ wrapper around boost::ublas), gives: File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/pyplot.py, line 2096, in plot ret = gca().plot(*args, **kwargs) File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/axes.py, line 3277, in plot for line in self._get_lines(*args, **kwargs): File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/axes.py, line 394, in _grab_next_args for seg in self._plot_2_args(remaining, **kwargs): File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/axes.py, line 267, in _plot_2_args if is_string_like(tup2[1]): File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/cbook.py, line 277, in is_string_like try: obj + '' RuntimeError: check:: failed If I convert the 2nd arg to array, it works: pylab.plot (xaxis, np.array(log10 (the_sum)*10)) Doesn't plot support arbitrary sequences? -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plot problem
On Friday 16 January 2009, Eric Firing wrote: Neal Becker wrote: pylab.plot (xaxis, log10 (the_sum)*10) where xaxis is numpy array, and log10(the_sum)*10 is my own class that is a valid python sequence (it is a c++ wrapper around boost::ublas), gives: File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/pyplot.py, line 2096, in plot ret = gca().plot(*args, **kwargs) File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/axes.py, line 3277, in plot for line in self._get_lines(*args, **kwargs): File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/axes.py, line 394, in _grab_next_args for seg in self._plot_2_args(remaining, **kwargs): File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/axes.py, line 267, in _plot_2_args if is_string_like(tup2[1]): File /usr/lib/python2.5/site-packages/matplotlib-0.98.5.2-py2.5-linux- x86_64.egg/matplotlib/cbook.py, line 277, in is_string_like try: obj + '' RuntimeError: check:: failed If I convert the 2nd arg to array, it works: pylab.plot (xaxis, np.array(log10 (the_sum)*10)) Doesn't plot support arbitrary sequences? Partial correction to my previous post: is_string_like looks for a TypeError or ValueError to be raised. I suppose we could look for any exception, since your object raises a RuntimeError. I wonder whether it would be equally effective and more robust if the test were try: '' + obj instead of the other way around. Eric IIRC, boost::python translates c++ exceptions to RuntimeError. If true, then it's a lot easier to fix matplotlib than to fix boost::python wrappers. -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] [newb] batch processing
To produce a batch of pdfs, I'm using: close () figure (1, figsize=(11,8)) ... savefig (open (whatever, 'w')) Works, but causes my display to flash, I think each time either close() or figure() is called (not sure which). Any better way? - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] [newb] axes hold question
I have sets of data to plot on semilogy. I want the minimum y axis set to some value, say 10e-10. I do: axis([0,1,1e-10,1]) hold(True) for (whatever): semilogy (x, y) grid() legend() show() But the data is not clipped in y from [1e-10..1] as I wanted. What's wrong here? - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] automatically choose line markers/styles?
Alan G Isaac wrote: On Thu, 14 Feb 2008, Neal Becker apparently wrote: Can I get nice default line styles and markers, automatically set up with matching legend? Automatically chosen? I don't want to have to go through and manually choose each marker and line style. Well, you have to ask for a legend, but everything else default looks good to me. What is an example where you do not like the default behavior? Are you trying to make a bunch of figures look alike? IIUC, in order to have each line with distinct line style, I have to explicitly set the line style. I want pylab to just choose them, just as it does for colors. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting from xemacs always 1 step behind
On Tuesday 12 February 2008, John Hunter wrote: On Feb 12, 2008 6:49 AM, Neal Becker [EMAIL PROTECTED] wrote: This is a bit wierd. If running from xemacs, it seems interactive plotting is always 1 step behind. I assume you have set 'interactive : True' in your rc file? What backend are you using (you should be using tkagg from xemacs) since it does not require GUI threading support. http://matplotlib.sf.net/interactive.html JDH I did set interactive. I was using QtAgg. I hate tk. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] automatically choose line markers/styles?
Can matplotlib automatically choose line styles and/or markers for a group of plots? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] automatically choose line markers/styles?
Alan G Isaac wrote: On Thu, 14 Feb 2008, Neal Becker apparently wrote: Can matplotlib automatically choose line styles and/or markers for a group of plots? http://matplotlib.sourceforge.net/matplotlibrc Although I prefer to pass in a dict of keyword arguments. Not sure what you're telling me here. I'm thinking: I can get nice default grid with grid() I can get nice default legend with legend() Can I get nice default line styles and markers, automatically set up with matching legend? Automatically chosen? I don't want to have to go through and manually choose each marker and line style. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting from xemacs always 1 step behind
Phil Austin wrote: John Hunter wrote: Well, the problem is that GTK, WX and Qt require threading support to use them properly interactively. ipython has special modes for these to run the GUI mainloop in the separate thread. tk is special in this regard, in that it runs from a standard python shell w/o threading support. You may be able to configure ipython within xemacs to take advantage of both xemacs and ipython's support for interactive qt plotting in pylab. FWIW, everything's working correctly for me using xemacs + ipython: Xemacs 21.5 current svn snapshot of python-mode.el from http://sourceforge.net/projects/python current ipython svn snapshot Centos 5.1 and python 2.5.1 Works for me if invoked from xemacs shell as ipython -pylab. If invoked from M-x py-shell doesn't work. Now if I could just figure out where to modify the way py-shell invokes ipython to add the -pylab. Doc say C-u M-x py-shell would prompt for args, but the doc lies. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] exceptions from easy_install matplotlib
Should I be worried about these? Installed /usr/lib/python2.5/site-packages/matplotlib-0.91.2-py2.5-linux-x86_64.egg Processing dependencies for matplotlib Finished processing dependencies for matplotlib Exception exceptions.OSError: (2, 'No such file or directory', 'src/image.cpp') in bound method CleanUpFile.__del__ of setupext.CleanUpFile instance at 0xee08c0 ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/transforms.cpp') in bound method CleanUpFile.__del__ of setupext.CleanUpFile instance at 0xedcc68 ignored Exception exceptions.OSError: (2, 'No such file or directory', 'src/backend_agg.cpp') in bound method CleanUpFile.__del__ of setupext.CleanUpFile instance at 0xee0710 ignored - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users