[Matplotlib-users] Antialiasing colorbars
Hi matplotlib users, Is it possible to disable antialiasing for a colorbar? If not directly is it the possible to postprocess the axes instance to se antialiasing for relevant elements? The reason I am asking is because I would like to produce a paletted png (using PIL) of the colorbar without the risk of removing any important colors in the process (in essence the output from matplotlib needs to have less than 256 colors for this to work). Best regards, Jesper -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Antialiasing colorbars
On 2014/09/30, 2:41 AM, Jesper Larsen wrote: Hi matplotlib users, Is it possible to disable antialiasing for a colorbar? If not directly is it the possible to postprocess the axes instance to se antialiasing for relevant elements? The colorbar returns a Colorbar object, the solids attribute of which is a Quadmesh; so you should be able to execute cbar.solids.set_antialiased(False) to turn off antialiasing. With a bit of testing, however, I am not seeing any difference, so I'm not sure what is going on, and I don't have time now to investigate. Eric The reason I am asking is because I would like to produce a paletted png (using PIL) of the colorbar without the risk of removing any important colors in the process (in essence the output from matplotlib needs to have less than 256 colors for this to work). Best regards, Jesper -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Diplaying 2D images in mplot3d
Dear list, I would like to display a 2D image in a mplot3d axe in order to combine it with a surface3D or a bar3d plot for instance. The effect I am looking for is similar to what can be seen in the bottom XY plane of http://matplotlib.org/1.4.0/examples/mplot3d/contourf3d_demo2.html, except that I would like to have a custom image instead of the filled contours. I googled the subject and found only messages dating at best from 2010. These messages mentioned that the imshow() method did not work on a mplot3d. Indeed it does not. The only alternatives offered by the googled answer to my problem were to switch to VTK or Mayavi. For one thing, I never managed to install VTK on my PC, and I already have other matplotlib figures in my wxpython application so I would really like to stick to matplotlib. Does anyone have pointers as to how I could display a 2D image in mplot3d? Do I need to create a new artist in order to replace the non-functionning imshow? I see that patch collections work fine in mplot3D. Would it be feasible to load an image and have it displayed as a patch collection (1 patch for each pixel)? Any advice would be highly appreciated, Fabrice --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Diplaying 2D images in mplot3d
I tried something like this awhile back to no avail. Because of the kludgy nature of mplot3d, we are lucky we even can display 2d artists like polygons (and, this is me speaking as the de facto maintainer of mplot3d!). Images are an entirely different beast, unfortunately. What *might* work is getting a pcolormesh object converted into 3d. Not pcolor (as that is an image-based object), but the QuadMesh object that gets returned by pcolormesh(). I haven't tried to convert that into a 3d equivalent, but it might be feasible. I would also check out glumpy: https://code.google.com/p/glumpy/. I could have sworn I have seen examples of glumpy treating images as texture data for surfaces. I hope this points you in a useful direction! Ben Root On Tue, Sep 30, 2014 at 5:54 PM, Fabrice C. kappamonag...@yahoo.co.jp wrote: Dear list, I would like to display a 2D image in a mplot3d axe in order to combine it with a surface3D or a bar3d plot for instance. The effect I am looking for is similar to what can be seen in the bottom XY plane of http://matplotlib.org/1.4.0/examples/mplot3d/contourf3d_demo2.html, except that I would like to have a custom image instead of the filled contours. I googled the subject and found only messages dating at best from 2010. These messages mentioned that the imshow() method did not work on a mplot3d. Indeed it does not. The only alternatives offered by the googled answer to my problem were to switch to VTK or Mayavi. For one thing, I never managed to install VTK on my PC, and I already have other matplotlib figures in my wxpython application so I would really like to stick to matplotlib. Does anyone have pointers as to how I could display a 2D image in mplot3d? Do I need to create a new artist in order to replace the non-functionning imshow? I see that patch collections work fine in mplot3D. Would it be feasible to load an image and have it displayed as a patch collection (1 patch for each pixel)? Any advice would be highly appreciated, Fabrice --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] seg fault installing
I'm using pip but even without it when I run setup.py build or setup.py install in the matplotlib directory I get a segfault early in the run. If I trace it, the seg fault is shortly after numbers.pyc is loaded from numpy, but even if I uninstall numpy I still get a segfault when I try to install mapplotlib. Only matplotlib has this issue. Other packages can uninstall and reinstall fine. steve # pip install matplotlib Downloading/unpacking matplotlib Downloading matplotlib-1.4.0.tar.gz (51.2MB): 51.2MB downloaded Running setup.py (path:/tmp/pip_build_root/matplotlib/setup.py) egg_info for package matplotlib Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz Extracting in /tmp/tmp6VPGqi Now working in /tmp/tmp6VPGqi/distribute-0.6.28 Building a Distribute egg in /tmp/pip_build_root/matplotlib /tmp/pip_build_root/matplotlib/distribute-0.6.28-py2.7.egg Complete output from command python setup.py egg_info: Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz Extracting in /tmp/tmp6VPGqi Now working in /tmp/tmp6VPGqi/distribute-0.6.28 Building a Distribute egg in /tmp/pip_build_root/matplotlib /tmp/pip_build_root/matplotlib/distribute-0.6.28-py2.7.egg Cleaning up... Command python setup.py egg_info failed with error code -11 in /tmp/pip_build_root/matplotlib Storing debug log for failure in /root/.pip/pip.log # tail -20 /root/.pip/pip.log /tmp/pip_build_root/matplotlib/distribute-0.6.28-py2.7.egg Cleaning up... Removing temporary dir /tmp/pip_build_root... Command python setup.py egg_info failed with error code -11 in /tmp/pip_build_root/matplotlib Exception information: Traceback (most recent call last): File /usr/local/lib/python2.7/site-packages/pip/basecommand.py, line 122, in main status = self.run(options, args) File /usr/local/lib/python2.7/site-packages/pip/commands/install.py, line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File /usr/local/lib/python2.7/site-packages/pip/req.py, line 1229, in prepare_files req_to_install.run_egg_info() File /usr/local/lib/python2.7/site-packages/pip/req.py, line 325, in run_egg_info command_desc='python setup.py egg_info') File /usr/local/lib/python2.7/site-packages/pip/util.py, line 697, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command python setup.py egg_info failed with error code -11 in /tmp/pip_build_root/matplotlib -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users