You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(20) |
2
(21) |
3
(21) |
4
(14) |
5
(8) |
|
6
(12) |
7
(16) |
8
(27) |
9
(39) |
10
(19) |
11
(12) |
12
(3) |
|
13
(3) |
14
(18) |
15
(14) |
16
(6) |
17
(7) |
18
(19) |
19
(5) |
|
20
(8) |
21
(24) |
22
(42) |
23
(12) |
24
(11) |
25
(16) |
26
(2) |
|
27
(4) |
28
(10) |
|
|
|
|
|
|
From: Michael A. <sel...@gm...> - 2011-02-06 18:51:19
|
Hello all, I believe I have found a bug in matplotlib's `dviread.py' file. I am running Ubuntu 10.10 x86_64 and Sage 4.6.1, which includes matplotlib 1.0.0. Also I have TeX Live 2010 installed (full install from the web installer). It is important to note that the issue to be described *does not occur* when TeX Live 2009 from the Ubuntu repositories is installed instead of TeX Live 2010. The issue also occurs with matplotlib 1.0.1. When trying to save a matplotlib figure as a PDF with `text.usetex = True' in `matplotlibrc', at some point the `PsfontsMap' function in `dviread.py' attempts to parse TeX Live 2010's `pdftex.map' file and fails. Other people are having the same problem. See the following two links for more information: http://groups.google.com/group/sage-support/browse_thread/thread/dd4a97c3e06e831f (see second post) http://article.gmane.org/gmane.comp.python.matplotlib.general/26110 Here is a minimal test case to demonstrate: ---------------------------------------------------------------------- | Sage Version 4.6.1, Release Date: 2011-01-11 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: from matplotlib.dviread import * sage: PsfontsMap(find_tex_file('pdftex.map')) --------------------------------------------------------------------------- AssertionError Traceback (most recent call last) /home/michael/<ipython console> in <module>() /opt/local/sage/local/lib/python2.6/site-packages/matplotlib/dviread.pyc in __init__(self, filename) 666 file = open(filename, 'rt') 667 try: --> 668 self._parse(file) 669 finally: 670 file.close() /opt/local/sage/local/lib/python2.6/site-packages/matplotlib/dviread.pyc in _parse(self, file) 699 while pos < len(line) and line[pos] == ' ': 700 pos += 1 --> 701 self._register(words) 702 703 def _register(self, words): /opt/local/sage/local/lib/python2.6/site-packages/matplotlib/dviread.pyc in _register(self, words) 725 encoding = word[1:] 726 elif word.endswith('.enc'): --> 727 assert encoding is None 728 encoding = word 729 else: AssertionError: sage: Here is some debug information (the last two lines may be relevant): $HOME=/home/michael CONFIGDIR=/home/michael/.sage//matplotlib-1.0.0 matplotlib data path /opt/local/sage/local/lib/python2.6/site-packages/matplotlib/mpl-data loaded rc file /opt/local/sage/local/lib/python2.6/site-packages/matplotlib/mpl-data/matplotlibrc matplotlib version 1.0.0 verbose.level debug interactive is False units is False platform is linux2 loaded modules: ['numpy.lib._iotools', 'xml.sax.urlparse', 'distutils', 'numpy.lib.npyio', 'matplotlib.errno', 'matplotlib.matplotlib', '_bisect', 'subprocess', 'gc', 'matplotlib.tempfile', 'distutils.sysconfig', 'ctypes._endian', 'encodings.encodings', 'matplotlib.colors', 'numpy.core.numerictypes', 'numpy.testing.sys', 'numpy.core.info', 'xml', 'numpy.fft.types', 'numpy.ma.cPickle', 'struct', 'numpy.matrixlib.defmatrix', 'numpy.random.info', 'tempfile', 'numpy.compat.types', 'base64', 'numpy.linalg', 'matplotlib.threading', 'numpy.core.machar', 'numpy.testing.types', 'numpy.testing', 'collections', 'numpy.polynomial.sys', 'numpy.core.umath', 'distutils.types', 'numpy.testing.operator', 'numpy.lib.numpy', 'numpy.core.scalarmath', 'numpy.ma.sys', 'zipimport', 'string', 'matplotlib.subprocess', 'numpy.testing.os', 'matplotlib.locale', 'numpy.lib.arraysetops', 'numpy.testing.unittest', 'numpy.lib.math', 'encodings.utf_8', 'matplotlib.__future__', 'ssl', 'numpy.testing.re', 'itertools', 'numpy.version', 'numpy.lib.re', 'distutils.re', 'numpy.matrixlib.sys', 'ctypes.os', 'numpy.core.os', 'numpy.lib.type_check', 'numpy.compat.sys', 'numpy.lib.__builtin__', 'signal', 'numpy.lib.types', 'numpy.lib._datasource', 'random', 'numpy.ma.extras', 'numpy.fft.fftpack_lite', 'matplotlib.cbook', 'ctypes.ctypes', 'xml.sax.xmlreader', 'numpy.polynomial.string', 'distutils.version', 'cStringIO', 'numpy.polynomial', 'numpy.numpy', 'matplotlib.StringIO', 'locale', 'numpy.add_newdocs', 'numpy.core.getlimits', 'xml.sax.saxutils', 'numpy.lib.sys', 'encodings', 'numpy.ma.itertools', 'array', 'StringIO', 'abc', 'numpy.matrixlib', 'numpy.ctypes', 'numpy.testing.decorators', 'matplotlib.warnings', 'rfc822', 'matplotlib.string', 'urllib', 'matplotlib.sys', 're', 'numpy.lib._compiled_base', 'threading', 'new', 'numpy.random.mtrand', 'urllib2', 'matplotlib.cPickle', 'math', 'numpy.fft.helper', 'fcntl', 'numpy.ma.warnings', 'matplotlib.numpy', 'UserDict', 'numpy.lib.function_base', 'distutils.os', 'matplotlib', 'numpy.fft.numpy', 'xml.sax.codecs', 'exceptions', 'numpy.lib.info', 'ctypes', 'numpy.lib.warnings', 'ctypes.struct', 'codecs', 'numpy.core._sort', 'numpy.os', '_functools', '_locale', 'numpy.__builtin__', 'matplotlib.sre_constants', 'matplotlib.os', 'thread', 'numpy.lib.ufunclike', 'numpy.core.memmap', 'traceback', 'numpy.testing.warnings', 'weakref', 'numpy.core._internal', 'numpy.compat._inspect', 'numpy.linalg.lapack_lite', 'numpy.ma', 'distutils.sys', 'os', 'marshal', 'numpy.lib.itertools', '__future__', 'matplotlib.copy', 'xml.sax.types', 'matplotlib.traceback', '_sre', 'unittest', 'numpy.core.sys', 'numpy.random', 'numpy.linalg.numpy', '__builtin__', 'numpy.lib.twodim_base', 'numpy.ma.core', 'matplotlib.re', 'numpy.core.cPickle', 'operator', 'numpy.polynomial.polytemplate', 'numpy.core.arrayprint', 'distutils.string', 'numpy.lib.arrayterator', 'select', 'ctypes._ctypes', 'ctypes.sys', 'matplotlib.datetime', 'posixpath', 'numpy.lib.financial', 'numpy.core.multiarray', 'errno', '_socket', 'binascii', 'sre_constants', 'datetime', 'numpy.core.shape_base', 'functools', 'xml.sax.handler', 'os.path', 'numpy.core.function_base', 'numpy.compat.py3k', 'numpy.lib.stride_tricks', 'numpy.core.numpy', 'numpy', '_warnings', 'numpy.polynomial.chebyshev', 'matplotlib.types', 'xml.sax.os', 'cPickle', 'encodings.__builtin__', 'numpy.polynomial.warnings', 'matplotlib.xml', 'matplotlib.new', '_codecs', 'numpy.lib.operator', 'numpy.polynomial.polynomial', 'numpy.__config__', '_collections', 'matplotlib.pyparsing', 'httplib', 'numpy.ma.numpy', 'copy', 'numpy.core.re', '_struct', 'numpy.core.fromnumeric', 'hashlib', 'numpy.ctypeslib', 'keyword', 'numpy.lib.scimath', 'numpy.fft', 'numpy.lib', 'bisect', 'numpy.random.numpy', 'matplotlib.urllib2', 'matplotlib.random', 'numpy.polynomial.__future__', 'posix', 'encodings.aliases', 'matplotlib.fontconfig_pattern', 'fnmatch', 'sre_parse', 'pickle', 'numpy.core.ctypes', 'mimetools', 'distutils.distutils', 'copy_reg', 'sre_compile', 'xml.sax', 'numpy.fft.fftpack', '_random', '_ctypes', 'numpy.lib.__future__', 'site', 'numpy.lib.polynomial', 'numpy.compat', 'numpy._import_tools', '__main__', 'numpy.fft.info', 'numpy.core.records', 'shutil', 'numpy.lib.cPickle', 'numpy.sys', 'matplotlib.weakref', 'xml.sax.urllib', 'numpy.core._dotblas', 'numpy.testing.traceback', 'strop', 'numpy.testing.numpytest', 'numpy.polynomial.numpy', 'numpy.core.numeric', 'numpy.linalg.info', 'encodings.codecs', '_abcoll', 'numpy.core', 'matplotlib.rcsetup', 'matplotlib.time', 'xml.sax._exceptions', 'genericpath', 'stat', '_ssl', 'numpy.lib.index_tricks', 'numpy.testing.utils', 'warnings', 'numpy.lib.utils', 'numpy.core.defchararray', 'numpy.polynomial.polyutils', 'numpy.lib.shape_base', 'numpy.core.types', 'textwrap', 'sys', '_hashlib', 'numpy.core.warnings', 'socket', 'numpy.core.__builtin__', 'xml.sax.sys', 'numpy.lib.format', 'numpy.lib.os', 'numpy.testing.nosetester', 'types', 'numpy.lib.shutil', 'matplotlib.distutils', '_weakref', 'distutils.errors', 'numpy.matrixlib.numpy', 'urlparse', 'linecache', 'matplotlib.shutil', 'numpy.lib.cStringIO', 'time', 'numpy.linalg.linalg', 'numpy.testing.numpy'] find_tex_file(pdftex.map): ['kpsewhich', 'pdftex.map'] find_tex_file result: /usr/local/texlive/2010/texmf-var/fonts/map/pdftex/updmap/pdftex.map Please let me know if there's anything more I may do to help fix whatever is going awry here. -Michael |
|
From: Benjamin R. <ben...@ou...> - 2011-02-06 18:16:00
|
On Sat, Feb 5, 2011 at 10:54 PM, Paul Leopardi <pau...@ii...>wrote: > Hi all, > I'm having trouble using multiple figures with mplot3d. Once each new > figure > is plotted, the plots from new figure is also displayed in all of the old > figures. For example, once the plot for figure 2 has finished, the plot fo > figure 1 is replaced by a copy of the plot for figure 2, and so on... > I have included an abbreviated version of my script code. My original code > uses Cython and my GluCat library, but I am fairly sure the cause of the > problem lies either with mplot3d or with my Python script code. > > I am using openSUSE 11.2 with > python-base-2.6.2-6.7.1.x86_64 > python-matplotlib-1.0.1-20.1.x86_64 > python-matplotlib-tk-1.0.1-20.1.x86_64 > python-matplotlib-wx-1.0.1-20.1.x86_64 > > Best, Paul > > Script excerpt: > > ... > from mpl_toolkits.mplot3d import Axes3D > import matplotlib.pyplot as plt > ... > # Plot C curves. > for i in xrange(0,C): > ... > # Use a new figure for each curve. > fig=plt.figure(figsize=(15,12)) > ax = fig.gca(projection='3d') > plt.show() > ... > # Split the curve into M segments, each with an appropriate colour. > for j in range(0,M): > # Find N points forming a curve segment ... > # Determine the colour of the curve segment... > # Plot the curve segment using the chosen colour. > alow=(abot-1 if j>0 else abot) > ax.plot(x[0,alow:atop],x[1,alow:atop],x[2,alow:atop],c=rgb.tolist()) > plt.draw() > plt.show() > > Paul, I am not exactly sure what your sample script is trying to do. Could you please attach a short self-contained working script that demonstrates your problem? Ben Root |
|
From: Laurent <mok...@gm...> - 2011-02-06 15:12:08
|
> Your data are embedded in a Line2d object which is itself a child of an
> Axes, itself child of the figure. Try:
> Fig = F.matplotlib()
> ax = Fig.get_axes()[0] # to get the first (and maybe only) subplot
> line = ax.get_axes()[0]
> xdata = line.get_xdata()
> ydata = line.get_ydata()
There is something wrong ...
sage: var('x,y')
(x, y)
sage: F=implicit_plot(x**2+y**2==1,(x,-5,5),(y,-5,5))
sage: Fig = F.matplotlib()
sage: ax = Fig.get_axes()[0] <-- I checked : it is the only element :)
sage: line = ax.get_axes()[0]
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
TypeError: 'AxesSubplot' object does not support indexing
sage:line=ax.get_axes()
sage:type(line)
<class 'matplotlib.axes.AxesSubplot'>
However, using some "grep get_ydata" from that point, I suceed to track
my information.
It was in the segments argument of matplotlib.collections.LineCollection
Now I'm tracking back the information ... It is in
mcontour.QuadContourSet(self, *args, **kwargs).allsegs
in the method matplotlib.axes.Axes.contour()
I'm almost done.
Thanks for help !
Have a nice afternoon
Laurent
PS :
I'll post the final answer here :
http://ask.sagemath.org/question/359/get_minmax_data-on-implicit_plot
PPS :
Argh !! Someone already did !
|
|
From: Fabrice S. <si...@lm...> - 2011-02-06 14:15:21
|
Le dimanche 06 février 2011 à 14:29 +0100, Laurent a écrit :
> If it can help, I have the following in a Sage terminal :
>
> sage: var('x,y')
> sage: F=implicit_plot(x**2+y**2==2,(x,-5,5),(y,-5,5),plot_points=100)
> sage: F.matplotlib()
> <matplotlib.figure.Figure object at 0xbfb60ac>
> sage: F.matplotlib().get_children()
> [<matplotlib.patches.Rectangle object at 0xc144e4c>,
> <matplotlib.axes.AxesSubplot object at 0xc14472c>]
>
> I really do not understand where is the data ??? In the Rectangle ? In
> the Axes ?
Your data are embedded in a Line2d object which is itself a child of an
Axes, itself child of the figure. Try:
Fig = F.matplotlib()
ax = Fig.get_axes()[0] # to get the first (and maybe only) subplot
line = ax.get_axes()[0]
xdata = line.get_xdata()
ydata = line.get_ydata()
--
Fabrice Silva
|
|
From: Tom v. d. H. <To...@va...> - 2011-02-06 13:37:47
|
Dear Sebastian,
Your solution is simple, well described and it works with minimal effort
Thank you so much!
I hope the Matplotlib devellopers will take some action.
Tom
Op 6-2-2011 13:16, Sebastian Voigt schreef:
> Hello Tom,
>
> I encountered the same problem recently. The toolbar icons are a mix of
> png and svg images. The png images are displayed properly while the svg
> icons are not shown. This is a problem with PyQt. I found a proposal on
> the web, where you should add the line
>
> import PyQt4.QtXml
>
> somewhere to your code. This is because xml support is needed to read
> svg files. However, this did not work for me. Instead I now use a rather
> ugly workaround: I rename the original *.png icon files to *.svg for
> those icons that are expected to be svg files. Qt will then find an svg
> file but it's clever enough to load it as png.
> Save those modified files somewhere as resources. Add them to the
> data_files list in your setup script and they will overwrite the
> original files at every build so you don't have to care any more.
>
> You can find out which files have to be renamed by looking into
> PACKAGEPATH/matplotlib/backends/backend_qt4.py line 399 and below.
> Another approach would be to directly rename the files in
> NavigationToolbar2QT._init_toolbar() to *.png since matplotlib provides
> png and svg files for every icon.
>
> Greetings,
> Sebastian
>
>
> Am 06.02.2011 11:20, schrieb Tom van der Hoeven:
>> Hello,
>>
>> I have a simple program
>> ---------------graf.py--------------
>>
>> import matplotlib.pyplot as plt
>> plt.plot([1,2,3,8,0,9,1,10,5])
>> plt.ylabel('some numbers')
>> plt.show()
>> --------------------------------------------------
>> If I look to a matplotlib figures on my screen using the exe made with
>> py2exe I mis all the buttons but one of the navigation bar.
>> If I work direct with the Python interpreted they are there.
>> I use the current version of Pythonxy
>>
>> ------------ setup.py --------------
>> from distutils.core import setup
>> import py2exe
>> import matplotlib
>>
>> name = 'graf.py'
>> INCLUDES = [ 'sip' , 'matplotlib.numerix.random_array'
>> # , 'PyQt4._qt'
>> , 'matplotlib.backends'
>> ,
>> 'matplotlib.backends.backend_qt4agg']
>> #['matplotlib.backends.backend_qt4agg']
>> EXCLUDES = []
>> [ '_gtkagg' , '_tkagg' , 'Tkconstants' , 'Tkinter' ,'tcl' ]
>> #['_tkagg' , '_ps' , '_fltkagg' , 'Tkinter' , 'Tkconstants' , '_cairo' ,
>> '_gtk' , 'gtkcairo' ,
>> # 'pydoc' , 'sqlite3' , 'bsddb' , 'curses' , 'tcl' ,
>> '_wxagg' , '_gtagg' , '_cocoaagg' , '_wx' ]
>> DLL_EXCLUDES = ['MSVCP90.dll']
>> ICON_RESOURSES = []
>> OTHER_RESOURCES = []
>> DATA_FILES = matplotlib.get_py2exe_datafiles()
>>
>> setup(name = name,
>> version = '1.0',
>> options = { "py2exe" : { 'compressed' : 1,
>> 'optimize' : 2,
>> 'bundle_files' : 2,
>> 'includes' : INCLUDES,
>> 'excludes' : EXCLUDES,
>> 'dll_excludes' : DLL_EXCLUDES }
>> } ,
>> console = [ { 'script' : name,
>> 'icon_resources' : ICON_RESOURSES,
>> 'other_resources' : OTHER_RESOURCES, } ] ,
>> description = 'Hele mooie',
>> author = 'Tom van der Hoeven',
>> author_email = 'To...@va...' ,
>> maintainer = 'Tom van der Hoeven',
>> maintainer_email = 'To...@va...',
>> license = '',
>> url = 'http://projecthomepage.com',
>> data_files = DATA_FILES,
>> )
>> -------------------------
>> can you help me
>>
>> Tom
>>
>> ------------------------------------------------------------------------------
>> The modern datacenter depends on network connectivity to access resources
>> and provide services. The best practices for maximizing a physical server's
>> connectivity to a physical network are well understood - see how these
>> rules translate into the virtual world?
>> http://p.sf.net/sfu/oracle-sfdevnlfb
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
> ------------------------------------------------------------------------------
> The modern datacenter depends on network connectivity to access resources
> and provide services. The best practices for maximizing a physical server's
> connectivity to a physical network are well understood - see how these
> rules translate into the virtual world?
> http://p.sf.net/sfu/oracle-sfdevnlfb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Laurent <mok...@gm...> - 2011-02-06 13:29:16
|
Hello all !
I'm sorry if my question is not clear, but I do not know ho to produce a
simple example.
I'm plotting the graph of an implicit given function (say x^2+y^2=3)
using Sage.
What I know it that
1. when I ask sage to plot implicit_plot( f==3,(x,-5,5),(y,-5,5) ),
Sage computes f-3 on an array of points in the square (-5,-5)x(5,5).
2. Sage creates an object matplotlib.figure.Figure that contains
somewhere the information about the array of computed points and ask
matplotlib to plot it
What I understood is that somewhere in matplotlib, the values are parsed
and a path is created. That path is the set of points on which f-3=0
My aim : catch the set of points that satisfy f-3=0. That has to be
stored --or at last computed-- somewhere in matplotlib.figure.Figure
I read the source, but I'm really lost.
The final purpose is to know the bounding box of the points that are
*actually* plotted without taking into account the axes, labels and
other decorations.
Does someone know how to do that ?
Since the object I have on hand is created by Sage[1] in a quite complex
way, I'm sorry to not being able to furnish an example.
Thanks
Laurent
If it can help, I have the following in a Sage terminal :
sage: var('x,y')
sage: F=implicit_plot(x**2+y**2==2,(x,-5,5),(y,-5,5),plot_points=100)
sage: F.matplotlib()
<matplotlib.figure.Figure object at 0xbfb60ac>
sage: F.matplotlib().get_children()
[<matplotlib.patches.Rectangle object at 0xc144e4c>,
<matplotlib.axes.AxesSubplot object at 0xc14472c>]
I really do not understand where is the data ??? In the Rectangle ? In
the Axes ?
On the Sage's side, the discussion is here :
http://ask.sagemath.org/question/359/get_minmax_data-on-implicit_plot
[1] www.sagemath.org
|
|
From: Sebastian V. <sv...@gm...> - 2011-02-06 12:16:59
|
Hello Tom,
I encountered the same problem recently. The toolbar icons are a mix of
png and svg images. The png images are displayed properly while the svg
icons are not shown. This is a problem with PyQt. I found a proposal on
the web, where you should add the line
import PyQt4.QtXml
somewhere to your code. This is because xml support is needed to read
svg files. However, this did not work for me. Instead I now use a rather
ugly workaround: I rename the original *.png icon files to *.svg for
those icons that are expected to be svg files. Qt will then find an svg
file but it's clever enough to load it as png.
Save those modified files somewhere as resources. Add them to the
data_files list in your setup script and they will overwrite the
original files at every build so you don't have to care any more.
You can find out which files have to be renamed by looking into
PACKAGEPATH/matplotlib/backends/backend_qt4.py line 399 and below.
Another approach would be to directly rename the files in
NavigationToolbar2QT._init_toolbar() to *.png since matplotlib provides
png and svg files for every icon.
Greetings,
Sebastian
Am 06.02.2011 11:20, schrieb Tom van der Hoeven:
> Hello,
>
> I have a simple program
> ---------------graf.py--------------
>
> import matplotlib.pyplot as plt
> plt.plot([1,2,3,8,0,9,1,10,5])
> plt.ylabel('some numbers')
> plt.show()
> --------------------------------------------------
> If I look to a matplotlib figures on my screen using the exe made with
> py2exe I mis all the buttons but one of the navigation bar.
> If I work direct with the Python interpreted they are there.
> I use the current version of Pythonxy
>
> ------------ setup.py --------------
> from distutils.core import setup
> import py2exe
> import matplotlib
>
> name = 'graf.py'
> INCLUDES = [ 'sip' , 'matplotlib.numerix.random_array'
> # , 'PyQt4._qt'
> , 'matplotlib.backends'
> ,
> 'matplotlib.backends.backend_qt4agg']
> #['matplotlib.backends.backend_qt4agg']
> EXCLUDES = []
> [ '_gtkagg' , '_tkagg' , 'Tkconstants' , 'Tkinter' ,'tcl' ]
> #['_tkagg' , '_ps' , '_fltkagg' , 'Tkinter' , 'Tkconstants' , '_cairo' ,
> '_gtk' , 'gtkcairo' ,
> # 'pydoc' , 'sqlite3' , 'bsddb' , 'curses' , 'tcl' ,
> '_wxagg' , '_gtagg' , '_cocoaagg' , '_wx' ]
> DLL_EXCLUDES = ['MSVCP90.dll']
> ICON_RESOURSES = []
> OTHER_RESOURCES = []
> DATA_FILES = matplotlib.get_py2exe_datafiles()
>
> setup(name = name,
> version = '1.0',
> options = { "py2exe" : { 'compressed' : 1,
> 'optimize' : 2,
> 'bundle_files' : 2,
> 'includes' : INCLUDES,
> 'excludes' : EXCLUDES,
> 'dll_excludes' : DLL_EXCLUDES }
> } ,
> console = [ { 'script' : name,
> 'icon_resources' : ICON_RESOURSES,
> 'other_resources' : OTHER_RESOURCES, } ] ,
> description = 'Hele mooie',
> author = 'Tom van der Hoeven',
> author_email = 'To...@va...' ,
> maintainer = 'Tom van der Hoeven',
> maintainer_email = 'To...@va...',
> license = '',
> url = 'http://projecthomepage.com',
> data_files = DATA_FILES,
> )
> -------------------------
> can you help me
>
> Tom
>
> ------------------------------------------------------------------------------
> The modern datacenter depends on network connectivity to access resources
> and provide services. The best practices for maximizing a physical server's
> connectivity to a physical network are well understood - see how these
> rules translate into the virtual world?
> http://p.sf.net/sfu/oracle-sfdevnlfb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Jae-Joon L. <lee...@gm...> - 2011-02-06 11:18:58
|
For an interactive use, you may use callbacks to update the visibility
of ticks automatically.
Regards,
-JJ
import matplotlib.transforms as mtransforms
def update_yticks(ax):
axis = ax.yaxis
interval = axis.get_view_interval()
# get visible ticks
myticks = [t for t in axis.iter_ticks() \
if mtransforms.interval_contains(interval, t[1])]
# make all ticks visible again
for mytick in myticks: mytick[0].label1.set_visible(True)
# make first tick invisible
myticks[0][0].label1.set_visible(False)
# make last tick invisible
myticks[-1][0].label1.set_visible(False)
import matplotlib.pyplot as plt
ax = plt.subplot(111)
update_yticks(ax)
cid = ax.callbacks.connect('ylim_changed', update_yticks)
On Sun, Feb 6, 2011 at 5:17 PM, Paul Ivanov <piv...@gm...> wrote:
> Francesco Montesano, on 2011-02-04 17:01, wrote:
>> Dear all again,
>>
>> I've tried to play with it again, but I couldn't find a
>> solution for the problem. For clarity I report an example of
>> what each of the subplots looks like:
>
> Hi Francesco,
>
> thanks for the clarification, here are two ways to get the look
> you want. I added some comments to help you understand what was
> going on before. (The resulting figure is attached, just in case).
>
> import numpy as np
> import matplotlib.pyplot as plt
> mean=np.array([-0.9206394, -0.90127456, -0.91983625, -0.97765539, -1.02991184,
> -1.02267017, -0.97730167, -0.93715172, -0.94324653, -0.92884379])
> stddev= np.array([0.16351397,0.15075966,0.13413909,0.15404823,0.13559582, 0.13109754,0.12128598,0.11589682,0.11921571,0.10866761])
>
> ax = plt.figure().add_axes([0.1,0.1,0.8,0.8])
> ax.errorbar(np.arange(10,20)/100., mean, yerr=stddev)
>
> ax.set_xlim([0.095, 0.195])
>
> lab = ax.get_ymajorticklabels()
> plt.draw() # ticks only get text assigned during a call to draw
> print lab
> for i in lab:
> print i # note that \u2212 is a unicode minus sign
>
> # this work for the first draw - relies on l.get_text() returning
> # nothing for labels which aren't used/drawn - which isn't the
> # case in general after panning and zooming interactively
> shown_lab = [l for l in lab if l.get_text()]
> shown_lab[0].set_visible(False)
> shown_lab[-1].set_visible(False)
>
> ## alternative solution without extra draw(). more robust, can be
> ## used even after initial draw.
> #ymin,ymax = ax.get_ylim()
> #tl = ax.yaxis.get_majorticklocs()
> #lab[(tl<ymin).sum()].set_visible(False)
> #lab[-(tl>ymax).sum()-1].set_visible(False)
>
> ## hybrid of the two.
> #ymin,ymax = ax.get_ylim()
> #tl = ax.yaxis.get_majorticklocs()
> #shown_lab = [l for l,t in zip(lab,tl) if t>ymin and t<ymax)
> #shown_lab[0].set_visible(False)
> #shown_lab[-1].set_visible(False)
>
> plt.show()
>
>
> best,
> --
> Paul Ivanov
> 314 address only used for lists, off-list direct email at:
> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk1OWQMACgkQe+cmRQ8+KPekfgCfcY+R1vb2i/l/AoVsFZwsyqCC
> ihoAn1uni4kEu4Kq+B0IdCu26Kw1aA9Q
> =B6ZO
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> The modern datacenter depends on network connectivity to access resources
> and provide services. The best practices for maximizing a physical server's
> connectivity to a physical network are well understood - see how these
> rules translate into the virtual world?
> http://p.sf.net/sfu/oracle-sfdevnlfb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Tom v. d. H. <To...@va...> - 2011-02-06 10:20:31
|
Hello,
I have a simple program
---------------graf.py--------------
import matplotlib.pyplot as plt
plt.plot([1,2,3,8,0,9,1,10,5])
plt.ylabel('some numbers')
plt.show()
--------------------------------------------------
If I look to a matplotlib figures on my screen using the exe made with
py2exe I mis all the buttons but one of the navigation bar.
If I work direct with the Python interpreted they are there.
I use the current version of Pythonxy
------------ setup.py --------------
from distutils.core import setup
import py2exe
import matplotlib
name = 'graf.py'
INCLUDES = [ 'sip' , 'matplotlib.numerix.random_array'
# , 'PyQt4._qt'
, 'matplotlib.backends'
,
'matplotlib.backends.backend_qt4agg']
#['matplotlib.backends.backend_qt4agg']
EXCLUDES = []
[ '_gtkagg' , '_tkagg' , 'Tkconstants' , 'Tkinter' ,'tcl' ]
#['_tkagg' , '_ps' , '_fltkagg' , 'Tkinter' , 'Tkconstants' , '_cairo' ,
'_gtk' , 'gtkcairo' ,
# 'pydoc' , 'sqlite3' , 'bsddb' , 'curses' , 'tcl' ,
'_wxagg' , '_gtagg' , '_cocoaagg' , '_wx' ]
DLL_EXCLUDES = ['MSVCP90.dll']
ICON_RESOURSES = []
OTHER_RESOURCES = []
DATA_FILES = matplotlib.get_py2exe_datafiles()
setup(name = name,
version = '1.0',
options = { "py2exe" : { 'compressed' : 1,
'optimize' : 2,
'bundle_files' : 2,
'includes' : INCLUDES,
'excludes' : EXCLUDES,
'dll_excludes' : DLL_EXCLUDES }
} ,
console = [ { 'script' : name,
'icon_resources' : ICON_RESOURSES,
'other_resources' : OTHER_RESOURCES, } ] ,
description = 'Hele mooie',
author = 'Tom van der Hoeven',
author_email = 'To...@va...' ,
maintainer = 'Tom van der Hoeven',
maintainer_email = 'To...@va...',
license = '',
url = 'http://projecthomepage.com',
data_files = DATA_FILES,
)
-------------------------
can you help me
Tom
|
|
From: Paul I. <piv...@gm...> - 2011-02-06 08:17:29
|
Francesco Montesano, on 2011-02-04 17:01, wrote:
> Dear all again,
>
> I've tried to play with it again, but I couldn't find a
> solution for the problem. For clarity I report an example of
> what each of the subplots looks like:
Hi Francesco,
thanks for the clarification, here are two ways to get the look
you want. I added some comments to help you understand what was
going on before. (The resulting figure is attached, just in case).
import numpy as np
import matplotlib.pyplot as plt
mean=np.array([-0.9206394, -0.90127456, -0.91983625, -0.97765539, -1.02991184,
-1.02267017, -0.97730167, -0.93715172, -0.94324653, -0.92884379])
stddev= np.array([0.16351397,0.15075966,0.13413909,0.15404823,0.13559582, 0.13109754,0.12128598,0.11589682,0.11921571,0.10866761])
ax = plt.figure().add_axes([0.1,0.1,0.8,0.8])
ax.errorbar(np.arange(10,20)/100., mean, yerr=stddev)
ax.set_xlim([0.095, 0.195])
lab = ax.get_ymajorticklabels()
plt.draw() # ticks only get text assigned during a call to draw
print lab
for i in lab:
print i # note that \u2212 is a unicode minus sign
# this work for the first draw - relies on l.get_text() returning
# nothing for labels which aren't used/drawn - which isn't the
# case in general after panning and zooming interactively
shown_lab = [l for l in lab if l.get_text()]
shown_lab[0].set_visible(False)
shown_lab[-1].set_visible(False)
## alternative solution without extra draw(). more robust, can be
## used even after initial draw.
#ymin,ymax = ax.get_ylim()
#tl = ax.yaxis.get_majorticklocs()
#lab[(tl<ymin).sum()].set_visible(False)
#lab[-(tl>ymax).sum()-1].set_visible(False)
## hybrid of the two.
#ymin,ymax = ax.get_ylim()
#tl = ax.yaxis.get_majorticklocs()
#shown_lab = [l for l,t in zip(lab,tl) if t>ymin and t<ymax)
#shown_lab[0].set_visible(False)
#shown_lab[-1].set_visible(False)
plt.show()
best,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
|
|
From: Paul L. <pau...@ii...> - 2011-02-06 04:54:58
|
Hi all, I'm having trouble using multiple figures with mplot3d. Once each new figure is plotted, the plots from new figure is also displayed in all of the old figures. For example, once the plot for figure 2 has finished, the plot fo figure 1 is replaced by a copy of the plot for figure 2, and so on... I have included an abbreviated version of my script code. My original code uses Cython and my GluCat library, but I am fairly sure the cause of the problem lies either with mplot3d or with my Python script code. I am using openSUSE 11.2 with python-base-2.6.2-6.7.1.x86_64 python-matplotlib-1.0.1-20.1.x86_64 python-matplotlib-tk-1.0.1-20.1.x86_64 python-matplotlib-wx-1.0.1-20.1.x86_64 Best, Paul Script excerpt: ... from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt ... # Plot C curves. for i in xrange(0,C): ... # Use a new figure for each curve. fig=plt.figure(figsize=(15,12)) ax = fig.gca(projection='3d') plt.show() ... # Split the curve into M segments, each with an appropriate colour. for j in range(0,M): # Find N points forming a curve segment ... # Determine the colour of the curve segment... # Plot the curve segment using the chosen colour. alow=(abot-1 if j>0 else abot) ax.plot(x[0,alow:atop],x[1,alow:atop],x[2,alow:atop],c=rgb.tolist()) plt.draw() plt.show() |
|
From: vcgarcia <vit...@uo...> - 2011-02-06 02:14:50
|
Hey all, I try to create a .exe file using py2exe, but this error shows up when i try to run the created file .exe: Traceback (most recent call last): File "ModeloPitzer.py", line 2, in <module> File "zipextimporter.pyo", line 82, in load_module File "matplotlib\pyplot.pyo", line 95, in <module> File "matplotlib\backends\__init__.pyo", line 25, in pylab_setup File "zipextimporter.pyo", line 82, in load_module File "matplotlib\backends\backend_qt4agg.pyo", line 12, in <module> File "zipextimporter.pyo", line 82, in load_module File "matplotlib\backends\backend_qt4.pyo", line 16, in <module> File "zipextimporter.pyo", line 82, in load_module File "matplotlib\backends\qt4_editor\figureoptions.pyo", line 11, in <module> File "zipextimporter.pyo", line 82, in load_module File "matplotlib\backends\qt4_editor\formlayout.pyo", line 51, in <module> ImportError: Warning: formlayout requires PyQt4 >v4.3 My PyQt4 version is 4.5.4. How can I solve that? Anyone? -- View this message in context: http://old.nabble.com/Warning%3A-formlayout-requires-PyQt4-%3Ev4.3-tp30838433p30838433.html Sent from the matplotlib - users mailing list archive at Nabble.com. |