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
|
|
From: Juergen H. <py...@el...> - 2013-03-30 17:37:25
|
Am 30.03.2013 16:29, schrieb Pawel Chojnacki: > Please pardon me, but what object is math.usetex attribute of? I can't find it in the documentation. > > http://matplotlib.org/users/usetex.html Mentions only text.usetex. > > You need to set mpl.rcParams['text.usetex'] = True For text you need unicode, for latex raw encoding. To have text and latex in one line, use xlabel(u'Häallo '+r'$\varphi$'+ 'r') Works for me, at least. |
|
From: Pawel C. <cho...@li...> - 2013-03-30 15:29:27
|
Please pardon me, but what object is math.usetex attribute of? I can't find it in the documentation. http://matplotlib.org/users/usetex.html Mentions only text.usetex. 2013/3/30 Phil Elson <pel...@gm...> > Doesn't look like you're using math.usetex & therefore are not actually > using latex, but mpl's stripped down tex implementation. > > Try setting usetex to True, or alternatively I think you could use \mathrm > instead of \text to get non mathematical text. > > HTH > > > On 30 March 2013 11:43, Pawel Chojnacki <cho...@li...> wrote: > >> Hello, >> >> I've been having some troubles with LaTeX in matplotlib. My example >> script: >> >> #!/usr/bin/env python2 >> #-*- coding: utf-8 -*- >> >> __author__ = 'Pawel Chojnacki' >> __copyright__ ='Copyleft 2013 Pawel Chojnacki' >> __version__ = '1.0' >> __date__ = '29-03-2013' >> __license__ = 'GPLv3' >> >> import numpy as np >> import matplotlib as mpl # Zmiana ustawien LaTeXa >> mpl.rcParams['text.latex.preamble'].append(r'\usepackage{amsmath}') >> #~ mpl.rcParams['text.latex.preamble'] = r'\usepackage{amsmath}' >> #~ mpl.rcParams['text.latex.preamble']=[r"\usepackage{amsmath}"] >> #~ mpl.rcParams['math.usetex'] = True >> print mpl.rcParams['text.latex.preamble'] >> import pylab as py >> >> py.axhspan(8400,8730,alpha=0.15) >> py.title(u'Wyniki eksperymentu pomiaru gęstości ciała >> stałego\n',size='large',family='serif') >> py.ylabel((u'Gęstość ciała stałego ' + >> r'$\frac{kg}{m^3}$'),size='large',family='serif') >> #~ py.ylabel((r'$\text{lol}$'),size='large',family='serif') >> py.ylabel((r'$\text{lol}$'),size='large',family='serif') >> py.xlabel(u'Metoda pomiaru',size='large',family='serif') >> py.grid(True) >> py.show() >> >> Gives me the following output: >> >> ['', '\\usepackage{amsmath}'] >> Exception in Tkinter callback >> Traceback (most recent call last): >> File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1437, in __call__ >> return self.func(*args) >> File >> "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line >> 236, in resize >> self.show() >> File >> "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line >> 239, in draw >> FigureCanvasAgg.draw(self) >> File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", >> line 421, in draw >> self.figure.draw(self.renderer) >> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in >> draw_wrapper >> draw(artist, renderer, *args, **kwargs) >> File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 898, in >> draw >> func(*args) >> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in >> draw_wrapper >> draw(artist, renderer, *args, **kwargs) >> File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 1997, in >> draw >> a.draw(renderer) >> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in >> draw_wrapper >> draw(artist, renderer, *args, **kwargs) >> File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1054, in >> draw >> self.label.draw(renderer) >> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in >> draw_wrapper >> draw(artist, renderer, *args, **kwargs) >> File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 526, in >> draw >> bbox, info = self._get_layout(renderer) >> File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 309, in >> _get_layout >> ismath=ismath) >> File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", >> line 193, in get_text_width_height_descent >> self.mathtext_parser.parse(s, self.dpi, prop) >> File "/usr/lib/pymodules/python2.7/matplotlib/mathtext.py", line 2999, >> in parse >> box = self._parser.parse(s, font_output, fontsize, dpi) >> File "/usr/lib/pymodules/python2.7/matplotlib/mathtext.py", line 2357, >> in parse >> self._expression.parseString(s) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 1048, >> in parseString >> loc, tokens = self._parse( instring, 0 ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, >> in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, >> in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2559, >> in parseImpl >> return self.expr._parse( instring, loc, doActions, callPreParse=False >> ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, >> in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, >> in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2307, >> in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, >> in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, >> in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2672, >> in parseImpl >> loc, tokens = self.expr._parse( instring, loc, doActions, >> callPreParse=False ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, >> in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, >> in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2307, >> in parseImpl >> loc, exprtokens = e._parse( instring, loc, doActions ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, >> in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, >> in _parseNoCache >> loc,tokens = self.parseImpl( instring, preloc, doActions ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2416, >> in parseImpl >> ret = e._parse( instring, loc, doActions ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, >> in _parseCache >> value = self._parseNoCache( instring, loc, doActions, callPreParse ) >> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 950, >> in _parseNoCache >> tokens = fn( instring, tokensStart, retTokens ) >> File "/usr/lib/pymodules/python2.7/matplotlib/mathtext.py", line 2050, >> in raise_error >> raise ParseFatalException(msg + "\n" + s) >> ParseFatalException: Expected end of math '$' >> $\text{lol}$ (at char 0), (line:1, col:1) >> >> And a blank window. The same line - $\text{lol}$ works pretty well in >> pure LaTeX. While the package seems loaded, matplotlib doesn't send the >> command as it's supposed to. Why is that? >> >> Thanks in advance, >> >> Pawel >> >> >> >> ------------------------------------------------------------------------------ >> 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 >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > |
|
From: Phil E. <pel...@gm...> - 2013-03-30 14:48:06
|
Doesn't look like you're using math.usetex & therefore are not actually
using latex, but mpl's stripped down tex implementation.
Try setting usetex to True, or alternatively I think you could use \mathrm
instead of \text to get non mathematical text.
HTH
On 30 March 2013 11:43, Pawel Chojnacki <cho...@li...> wrote:
> Hello,
>
> I've been having some troubles with LaTeX in matplotlib. My example script:
>
> #!/usr/bin/env python2
> #-*- coding: utf-8 -*-
>
> __author__ = 'Pawel Chojnacki'
> __copyright__ ='Copyleft 2013 Pawel Chojnacki'
> __version__ = '1.0'
> __date__ = '29-03-2013'
> __license__ = 'GPLv3'
>
> import numpy as np
> import matplotlib as mpl # Zmiana ustawien LaTeXa
> mpl.rcParams['text.latex.preamble'].append(r'\usepackage{amsmath}')
> #~ mpl.rcParams['text.latex.preamble'] = r'\usepackage{amsmath}'
> #~ mpl.rcParams['text.latex.preamble']=[r"\usepackage{amsmath}"]
> #~ mpl.rcParams['math.usetex'] = True
> print mpl.rcParams['text.latex.preamble']
> import pylab as py
>
> py.axhspan(8400,8730,alpha=0.15)
> py.title(u'Wyniki eksperymentu pomiaru gęstości ciała
> stałego\n',size='large',family='serif')
> py.ylabel((u'Gęstość ciała stałego ' +
> r'$\frac{kg}{m^3}$'),size='large',family='serif')
> #~ py.ylabel((r'$\text{lol}$'),size='large',family='serif')
> py.ylabel((r'$\text{lol}$'),size='large',family='serif')
> py.xlabel(u'Metoda pomiaru',size='large',family='serif')
> py.grid(True)
> py.show()
>
> Gives me the following output:
>
> ['', '\\usepackage{amsmath}']
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1437, in __call__
> return self.func(*args)
> File
> "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line
> 236, in resize
> self.show()
> File
> "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line
> 239, in draw
> FigureCanvasAgg.draw(self)
> File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py",
> line 421, in draw
> self.figure.draw(self.renderer)
> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 898, in
> draw
> func(*args)
> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 1997, in
> draw
> a.draw(renderer)
> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1054, in
> draw
> self.label.draw(renderer)
> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 526, in draw
> bbox, info = self._get_layout(renderer)
> File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 309, in
> _get_layout
> ismath=ismath)
> File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py",
> line 193, in get_text_width_height_descent
> self.mathtext_parser.parse(s, self.dpi, prop)
> File "/usr/lib/pymodules/python2.7/matplotlib/mathtext.py", line 2999,
> in parse
> box = self._parser.parse(s, font_output, fontsize, dpi)
> File "/usr/lib/pymodules/python2.7/matplotlib/mathtext.py", line 2357,
> in parse
> self._expression.parseString(s)
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 1048,
> in parseString
> loc, tokens = self._parse( instring, 0 )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981,
> in _parseCache
> value = self._parseNoCache( instring, loc, doActions, callPreParse )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924,
> in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2559,
> in parseImpl
> return self.expr._parse( instring, loc, doActions, callPreParse=False )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981,
> in _parseCache
> value = self._parseNoCache( instring, loc, doActions, callPreParse )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924,
> in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2307,
> in parseImpl
> loc, exprtokens = e._parse( instring, loc, doActions )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981,
> in _parseCache
> value = self._parseNoCache( instring, loc, doActions, callPreParse )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924,
> in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2672,
> in parseImpl
> loc, tokens = self.expr._parse( instring, loc, doActions,
> callPreParse=False )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981,
> in _parseCache
> value = self._parseNoCache( instring, loc, doActions, callPreParse )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924,
> in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2307,
> in parseImpl
> loc, exprtokens = e._parse( instring, loc, doActions )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981,
> in _parseCache
> value = self._parseNoCache( instring, loc, doActions, callPreParse )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924,
> in _parseNoCache
> loc,tokens = self.parseImpl( instring, preloc, doActions )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2416,
> in parseImpl
> ret = e._parse( instring, loc, doActions )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981,
> in _parseCache
> value = self._parseNoCache( instring, loc, doActions, callPreParse )
> File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 950,
> in _parseNoCache
> tokens = fn( instring, tokensStart, retTokens )
> File "/usr/lib/pymodules/python2.7/matplotlib/mathtext.py", line 2050,
> in raise_error
> raise ParseFatalException(msg + "\n" + s)
> ParseFatalException: Expected end of math '$'
> $\text{lol}$ (at char 0), (line:1, col:1)
>
> And a blank window. The same line - $\text{lol}$ works pretty well in pure
> LaTeX. While the package seems loaded, matplotlib doesn't send the command
> as it's supposed to. Why is that?
>
> Thanks in advance,
>
> Pawel
>
>
>
> ------------------------------------------------------------------------------
> 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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Pawel C. <cho...@li...> - 2013-03-30 11:43:42
|
Hello,
I've been having some troubles with LaTeX in matplotlib. My example script:
#!/usr/bin/env python2
#-*- coding: utf-8 -*-
__author__ = 'Pawel Chojnacki'
__copyright__ ='Copyleft 2013 Pawel Chojnacki'
__version__ = '1.0'
__date__ = '29-03-2013'
__license__ = 'GPLv3'
import numpy as np
import matplotlib as mpl # Zmiana ustawien LaTeXa
mpl.rcParams['text.latex.preamble'].append(r'\usepackage{amsmath}')
#~ mpl.rcParams['text.latex.preamble'] = r'\usepackage{amsmath}'
#~ mpl.rcParams['text.latex.preamble']=[r"\usepackage{amsmath}"]
#~ mpl.rcParams['math.usetex'] = True
print mpl.rcParams['text.latex.preamble']
import pylab as py
py.axhspan(8400,8730,alpha=0.15)
py.title(u'Wyniki eksperymentu pomiaru gęstości ciała
stałego\n',size='large',family='serif')
py.ylabel((u'Gęstość ciała stałego ' +
r'$\frac{kg}{m^3}$'),size='large',family='serif')
#~ py.ylabel((r'$\text{lol}$'),size='large',family='serif')
py.ylabel((r'$\text{lol}$'),size='large',family='serif')
py.xlabel(u'Metoda pomiaru',size='large',family='serif')
py.grid(True)
py.show()
Gives me the following output:
['', '\\usepackage{amsmath}']
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1437, in __call__
return self.func(*args)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py",
line 236, in resize
self.show()
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py",
line 239, in draw
FigureCanvasAgg.draw(self)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py",
line 421, in draw
self.figure.draw(self.renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 898, in
draw
func(*args)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 1997, in draw
a.draw(renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1054, in draw
self.label.draw(renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 526, in draw
bbox, info = self._get_layout(renderer)
File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 309, in
_get_layout
ismath=ismath)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py",
line 193, in get_text_width_height_descent
self.mathtext_parser.parse(s, self.dpi, prop)
File "/usr/lib/pymodules/python2.7/matplotlib/mathtext.py", line 2999, in
parse
box = self._parser.parse(s, font_output, fontsize, dpi)
File "/usr/lib/pymodules/python2.7/matplotlib/mathtext.py", line 2357, in
parse
self._expression.parseString(s)
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 1048,
in parseString
loc, tokens = self._parse( instring, 0 )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, in
_parseCache
value = self._parseNoCache( instring, loc, doActions, callPreParse )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, in
_parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2559,
in parseImpl
return self.expr._parse( instring, loc, doActions, callPreParse=False )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, in
_parseCache
value = self._parseNoCache( instring, loc, doActions, callPreParse )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, in
_parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2307,
in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, in
_parseCache
value = self._parseNoCache( instring, loc, doActions, callPreParse )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, in
_parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2672,
in parseImpl
loc, tokens = self.expr._parse( instring, loc, doActions,
callPreParse=False )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, in
_parseCache
value = self._parseNoCache( instring, loc, doActions, callPreParse )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, in
_parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2307,
in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, in
_parseCache
value = self._parseNoCache( instring, loc, doActions, callPreParse )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 924, in
_parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 2416,
in parseImpl
ret = e._parse( instring, loc, doActions )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 981, in
_parseCache
value = self._parseNoCache( instring, loc, doActions, callPreParse )
File "/usr/lib/pymodules/python2.7/matplotlib/pyparsing.py", line 950, in
_parseNoCache
tokens = fn( instring, tokensStart, retTokens )
File "/usr/lib/pymodules/python2.7/matplotlib/mathtext.py", line 2050, in
raise_error
raise ParseFatalException(msg + "\n" + s)
ParseFatalException: Expected end of math '$'
$\text{lol}$ (at char 0), (line:1, col:1)
And a blank window. The same line - $\text{lol}$ works pretty well in pure
LaTeX. While the package seems loaded, matplotlib doesn't send the command
as it's supposed to. Why is that?
Thanks in advance,
Pawel
|
|
From: Michael A. <mic...@uc...> - 2013-03-29 23:34:47
|
Is there a pylab version of ax.plot_surface?
I am asking because the following does not work when running an ipython
notebook in pylab mode:
#0: #create some data ….
#1: fig = plt.figure()
ax = fig.gca(projection='3d')
#2: surf = ax.plot_surface( …..) # taking the exact command from the examples.
I have verified that this code only does NOT work when #1 and #2 are
executed in different notebook cells. When they are combined in the
same cell, it works.
As I prefer the flexibility of being able to run everything anywhere, I
am asking for pylab versions of plot_surface, as I am mostly running
things in the pylab mode of the notebook.
Cheers,
Michael
|
|
From: Jeff L. <lay...@at...> - 2013-03-29 20:17:31
|
Good afternoon, I'd like to be able to plot some 2D Structured CFD meshes and contour plots (pressure, etc) using Matplotlib. I've googled a little but does anyone have any pointers or links to help get me started? Thanks! Jeff |
|
From: Mark L. <bre...@ya...> - 2013-03-29 15:48:56
|
Hi all, From http://labix.org/python-dateutil "To generate a rrule for the use case of "a date on the specified day of the month, unless it is beyond the end of month, in which case it will be the last day of the month" use the following: rrule(MONTHLY, bymonthday=(some_day, -1), bysetpos=1) This will generate a value for every calendar month regardless of the day of the month it is started from." Using bymonthday with MonthLocator gives ticks on the day given and the last day of the month, which looks extremely ugly. Code below demonstrates. from dateutil.rrule import * import datetime import matplotlib.pyplot as plt from matplotlib.ticker import FormatStrFormatter, MultipleLocator from matplotlib.dates import DateFormatter, MonthLocator, DayLocator start = datetime.date(2013, 3, 29) until = datetime.date(2014, 3, 29) dates = rrule(MONTHLY, bymonthday=(29, -1), bysetpos=1, until=until) for d in dates:print(d) dates = [start, until] values = [0, 1] plt.ylabel('Balance') plt.grid() ax = plt.subplot(111) plt.plot_date(dates, values, fmt = 'rx-') ax.xaxis.set_major_locator(MonthLocator(bymonthday = (dates[0].day, -1))) ax.xaxis.set_major_formatter(DateFormatter('%d/%m/%y')) ax.yaxis.set_major_formatter(FormatStrFormatter('£%0.2f')) ax.yaxis.set_minor_locator(MultipleLocator(5)) plt.axis(xmin=dates[0], xmax=dates[-1]) plt.setp(plt.gca().get_xticklabels(), rotation = 45, fontsize = 10) plt.setp(plt.gca().get_yticklabels(), fontsize = 10) plt.show() -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence |
|
From: Gökhan S. <gok...@gm...> - 2013-03-29 15:39:43
|
Here it comes -> https://github.com/matplotlib/matplotlib/issues/1871 On Fri, Mar 29, 2013 at 6:57 AM, Benjamin Root <ben...@ou...> wrote: > > > On Thu, Mar 28, 2013 at 12:52 PM, Gökhan Sever <gok...@gm...> > wrote: >> >> There is no documentation supplied for the first call. Should I file >> an issue for this on github? >> > > Wouldn't hurt. Be sure to include an image showing the result of each > command. > > Ben > -- Gökhan |
|
From: Benjamin R. <ben...@ou...> - 2013-03-29 12:58:23
|
On Thu, Mar 28, 2013 at 12:52 PM, Gökhan Sever <gok...@gm...>wrote: > There is no documentation supplied for the first call. Should I file > an issue for this on github? > > Wouldn't hurt. Be sure to include an image showing the result of each command. Ben |
|
From: Jody K. <jk...@uv...> - 2013-03-29 01:03:19
|
On Mar 28, 2013, at 14:36 PM, Eric Firing <ef...@ha...> wrote: > The problem is that it would be entirely redundant, given the vmin and vmax kwargs that have been there for a long time. Fair enough - I just often play with symmetric axis limits (i.e. [-1.,1.]) and so its helpful to be able to specify as an array and do something like clim = array([-1.,1.])*0.2 (for instance). Of course matplotlib probably has some other fancy way to rescale the vmin and vmax simultaneously... Thanks a lot, Jody -- Jody Klymak http://web.uvic.ca/~jklymak/ |
|
From: Eric F. <ef...@ha...> - 2013-03-28 21:36:17
|
On 2013/03/28 11:04 AM, Jody Klymak wrote: > > On Mar 28, 2013, at 11:51 AM, Eric Firing <ef...@ha...> wrote: > >> Pay attention only to the listed keyword arguments above that table. > > Sounds good.... > > OTOH a clim argument for pcolormesh would be nice, as I often end up calling "clim" after I've made a contour overtop of my pcolor, and then call clim, which is obviously not what I mean to do, but... > The problem is that it would be entirely redundant, given the vmin and vmax kwargs that have been there for a long time. I see your point, but we can't get rid of vmin and vmax (they provide more flexibility than clim would), so I think that the clutter disadvantage of adding clim outweighs the advantage. Eric > Thanks, Jody > > > -- > Jody Klymak > http://web.uvic.ca/~jklymak/ > > > > |
|
From: Jody K. <jk...@uv...> - 2013-03-28 21:04:51
|
On Mar 28, 2013, at 11:51 AM, Eric Firing <ef...@ha...> wrote: > Pay attention only to the listed keyword arguments above that table. Sounds good.... OTOH a clim argument for pcolormesh would be nice, as I often end up calling "clim" after I've made a contour overtop of my pcolor, and then call clim, which is obviously not what I mean to do, but... Thanks, Jody -- Jody Klymak http://web.uvic.ca/~jklymak/ |
|
From: Eric F. <ef...@ha...> - 2013-03-28 18:51:37
|
On 2013/03/28 8:23 AM, Jody Klymak wrote: > Hi Eric, > > The docs seem to indicate "clim" is an acceptable kwarg, hence my confusion... Jody, You are right, that chunk of the docs is completely fouled up with respect to kwargs. Thanks for pointing it out. The whole table of supposed QuadMesh properties should not be there. Doc autogeneration has run amok here. Pay attention only to the listed keyword arguments above that table. Eric > > http://matplotlib.org/api/pyplot_api.html?highlight=pcolormesh#matplotlib.pyplot.pcolormesh > > Thanks, Jody > > On Mar 28, 2013, at 11:12 AM, Eric Firing <ef...@ha...> wrote: > >> On 2013/03/28 7:56 AM, Jody Klymak wrote: >>> >>> Hi all, >>> >>> In 1.2.0: >>> >>> pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.)) >> >> Jody, >> >> There is no clim kwarg, only a clim pyplot function. You can do this, >> though: >> >> pcolormesh(..., vmin=-1, vmax=1) >> >> Eric >> >> >>> #clim((-1.,1.)) >>> >>> Doesn't seem to work, where as >>> >>> pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.)) >>> clim((-1.,1.)) >>> >>> does work. Is this a bug or am I misunderstanding "clim" in the context of pcolormesh? >>> >>> Thanks, Jody >>> >>> -- >>> Jody Klymak >>> http://web.uvic.ca/~jklymak/ >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> >> ------------------------------------------------------------------------------ >> Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- > Jody Klymak > http://web.uvic.ca/~jklymak/ > > > > |
|
From: Jody K. <jk...@uv...> - 2013-03-28 18:23:44
|
Hi Eric, The docs seem to indicate "clim" is an acceptable kwarg, hence my confusion... http://matplotlib.org/api/pyplot_api.html?highlight=pcolormesh#matplotlib.pyplot.pcolormesh Thanks, Jody On Mar 28, 2013, at 11:12 AM, Eric Firing <ef...@ha...> wrote: > On 2013/03/28 7:56 AM, Jody Klymak wrote: >> >> Hi all, >> >> In 1.2.0: >> >> pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.)) > > Jody, > > There is no clim kwarg, only a clim pyplot function. You can do this, > though: > > pcolormesh(..., vmin=-1, vmax=1) > > Eric > > >> #clim((-1.,1.)) >> >> Doesn't seem to work, where as >> >> pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.)) >> clim((-1.,1.)) >> >> does work. Is this a bug or am I misunderstanding "clim" in the context of pcolormesh? >> >> Thanks, Jody >> >> -- >> Jody Klymak >> http://web.uvic.ca/~jklymak/ >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Jody Klymak http://web.uvic.ca/~jklymak/ |
|
From: Eric F. <ef...@ha...> - 2013-03-28 18:17:46
|
On 2013/03/28 7:56 AM, Jody Klymak wrote: > > Hi all, > > In 1.2.0: > > pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.)) Jody, There is no clim kwarg, only a clim pyplot function. You can do this, though: pcolormesh(..., vmin=-1, vmax=1) Eric > #clim((-1.,1.)) > > Doesn't seem to work, where as > > pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.)) > clim((-1.,1.)) > > does work. Is this a bug or am I misunderstanding "clim" in the context of pcolormesh? > > Thanks, Jody > > -- > Jody Klymak > http://web.uvic.ca/~jklymak/ > > > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jody K. <jk...@uv...> - 2013-03-28 17:56:56
|
Hi all, In 1.2.0: pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.)) #clim((-1.,1.)) Doesn't seem to work, where as pcolormesh(x,z,U,rasterized='True',cmap=cm.RdBu_r,clim=(-1.,1.)) clim((-1.,1.)) does work. Is this a bug or am I misunderstanding "clim" in the context of pcolormesh? Thanks, Jody -- Jody Klymak http://web.uvic.ca/~jklymak/ |
|
From: John G. <jdg...@ma...> - 2013-03-28 17:03:38
|
On 2013-03-28, at 7:29 AM, KURT PETERS wrote: > If I'm using this SGP4 library: https://pypi.python.org/pypi/sgp4/ > which provides x,y,z of a satellite with respect to the center of > the Earth, what do you think would be the best way to calculate the > distance from the satellite to a lat/long point on the Earth using > MATPLOT library basemaps? > > I suppose using WGS 84, I could do something like: > # setup of basemap ('lcc' = lambert conformal conic). > # use major and minor sphere radii from WGS84 ellipsoid. > m = > Basemap > (llcrnrlon=-145.5,llcrnrlat=1.,urcrnrlon=-2.566,urcrnrlat=46.352,\ > rsphere=(6378137.00,6356752.3142),\ > resolution='l',area_thresh=1000.,projection='lcc',\ > lat_1=50.,lon_0=-107.,ax=ax) > > x,y = m(lon, lat) > > But how could I get "Z" for a particular coordinate so I could be > this norm calculation? And... would the x,y yielded above be in the > same coordinate frame (ie, from the center of the Earth) as the SGP4 > library in the first place? > > Regards, > Kurt The x,y you get from Basemap appear to be tailored to the particular projection you are using. If you change the projection, then you will probably get different x,y values for the same (lat,lon). This is very useful for mapping, but it is not what you need. You need convert your position P from geodetic coordinates (lat, lon) (more generally, (lat, lon, elevation)) to geocentric coordinates (x,y,z). Geocentric coordinates are also called Earth-centered-Earth- fixed (ECEF or ECF) coordinates. Here is a link to the formulas you need. Notice that the author uses the terminology Latitude,Longitude,Altitude (LLA) to refer to geodetic coordinates. http://www.satsleuth.com/GPS_ECEF_Datum_transformation.htm This can be difficult to interpret if you are doing it for the first time (and even if you have done it many times before!!). Feel free to email me directly if you have any questions. I would be glad to help. -John |
|
From: Gökhan S. <gok...@gm...> - 2013-03-28 16:52:48
|
There is no documentation supplied for the first call. Should I file
an issue for this on github?
On Wed, Mar 27, 2013 at 7:10 AM, Benjamin Root <ben...@ou...> wrote:
>
>
> On Wed, Mar 27, 2013 at 1:03 AM, Gökhan Sever <gok...@gm...> wrote:
>>
>> Hello,
>>
>> Aren't these two log scaling calls supposed to be performing the same
>> action?
>>
>> Here is a simple script tested in ipython --pylab
>>
>> fig = plt.figure(figsize=(5, 5))
>> ax1 = fig.add_subplot(1,1,1)
>> ax1.plot(np.random.randn(100))
>>
>> ax1.xaxis.set_scale('log')
>> ax1.set_xscale('log')
>>
>
> Intuitively, I guess they should be identical, but they don't seem to be.
> It seems like for "ax1.xaxis.set_scale('log')", everything is set correctly,
> except the projection.
>
> Ben Root
>
--
Gökhan
|
|
From: Andreas H. <li...@hi...> - 2013-03-28 15:49:42
|
Hi, I'm cross-posting a question I asked on SO: http://stackoverflow.com/q/15681890/152439 How can I vertically align text in matplotlib? My situation is as follows: I'm using `ImageGrid`, to plot a row of five images: grid = ImageGrid(fig, rect=(0.06, 0., 0.885, 1.), nrows_ncols = (1, 5), direction="row", axes_pad = 0., add_all=True, label_mode = "L", share_all = True, cbar_location="right", cbar_mode="single", cbar_size="10%", cbar_pad="0%", ) Within each axes, I want to add some text. For this, I defined the following function (following one of the examples): def add_inner_title(ax, title, loc, props): from matplotlib.offsetbox import AnchoredText at = AnchoredText(title, loc=loc, prop=props, pad=0., borderpad=0.5, frameon=False) ax.add_artist(at) return at which I use like this: ax = grid[i] tit = add_inner_title(ax, title, loc=3, props={'size':'x-small', 'color':'#b0b0b0', 'weight' : 'bold', 'va' : 'baseline'}) Now, in one of the plots, the axes, the title is "Pollution Signal", in another, it is "one", and in another, it is "GOME" (all just examples). The problem is that now the texts are not vertically aligned: The baseline of the text with a *g* is higher to accomodate for the needed space below the baseline. How can I achieve that in my case, all texts are vertically aligned, given that the heights of the individual text boxes are different? Any help is greatly appreciated! Andreas |
|
From: Michael D. <md...@st...> - 2013-03-28 13:45:48
|
matplotlib does not support the `\begin{array}` construct. You can see
what is supported here:
http://matplotlib.org/users/mathtext.html
If you need something like that in Sphinx, there are a number of other
math plugins here:
http://sphinx-doc.org/ext/math.html
Mike
On 03/28/2013 02:45 AM, Ilias Miroslav wrote:
> Hi again,
>
> if you did not receive the attachement of my previous email, the files are here:
>
> https://docs.google.com/folder/d/0B8qBHKNhZAipZ2pnS0ViTUZBdXM/edit?usp=sharing
>
> The log of the simplest non-rendering formula:
>
> .. math::
> \begin{array}{c}
> {\Psi}^{L} \\
> {\Psi}^{S}
> \end{array}
>
> is as follows:
>
> ilias@miro_ilias_desktop:~/Dokumenty/Work/programming/sphinx-math-test/.sphinx-build . .
> Running Sphinx v1.1.3
>
> loading pickled environment... not yet created
> No builder selected, using default: html
> building [html]: targets for 1 source files that are out of date
> updating environment: 1 added, 0 changed, 0 removed
> reading sources... [100%] index
> looking for now-outdated files... none found
> pickling environment... done
> checking consistency... done
> preparing documents... done
> /usr/lib/pymodules/python2.7/matplotlib/sphinxext/mathmpl.py:56: Warning: Could not render math expression $\begin{array}{c}{\Psi}^{L} \\{\Psi}^{S}\end{array}$
> Warning)
> #
> writing additional files... genindex search
> copying static files... done
> dumping search index... done
> dumping object inventory... done
> build succeeded.
>
>
> Best, Miro
>
> ________________________________________
> From: Ilias Miroslav
> Sent: Wednesday, March 27, 2013 8:28 PM
> To: mat...@li...
> Subject: difficult LaTeX formula for rendering
>
> Dear experts,
>
> in our sphinx-based project documentation (www.diracprogram.org) we have a complicated latex math formula, which is not rendered:
>
> /usr/lib/pymodules/python2.7/matplotlib/sphinxext/mathmpl.py:56: Warning: Could not render math expression $i \hbar \frac{\partial}{\partial t} \left( \begin{array}{c}\Psi^L \\\Psi^S \end{array} \right) = c \left( \begin{array}{c}(\vec{\sigma} \cdot \vec{\pi}) \Psi^S \\(\vec{\sigma} \cdot \vec{\pi}) \Psi^L \end{array} \right)+ m_ec^2 \left( \begin{array}{c} \Psi^L \\-\Psi^S \end{array} \right) + V \left( \begin{array}{c}\Psi^L \\\Psi^S \end{array} \right)$
>
> The index.rst file with the sole math formula is attached.
>
> I have most recent Ubuntu 12.10 (x86_64) with default packages python-sphinx 1.1.2, python-matplotlib 1.1.1.
>
> Any help, please ? I was trying to cut this formula down; the smallest LaTeX part not rendered is "\begin{array}{c}\Psi^L \\ \Psi^S \end{array}".
>
> Yours,
>
> Miro
> ------------------------------------------------------------------------------
> Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: KURT P. <pet...@ms...> - 2013-03-28 13:29:53
|
If I'm using this SGP4 library: https://pypi.python.org/pypi/sgp4/which provides x,y,z of a satellite with respect to the center of the Earth, what do you think would be the best way to calculate the distance from the satellite to a lat/long point on the Earth using MATPLOT library basemaps? I suppose using WGS 84, I could do something like:# setup of basemap ('lcc' = lambert conformal conic). # use major and minor sphere radii from WGS84 ellipsoid. m = Basemap(llcrnrlon=-145.5,llcrnrlat=1.,urcrnrlon=-2.566,urcrnrlat=46.352,\ rsphere=(6378137.00,6356752.3142),\ resolution='l',area_thresh=1000.,projection='lcc',\ lat_1=50.,lon_0=-107.,ax=ax) x,y = m(lon, lat) But how could I get "Z" for a particular coordinate so I could be this norm calculation? And... would the x,y yielded above be in the same coordinate frame (ie, from the center of the Earth) as the SGP4 library in the first place? Regards,Kurt |
|
From: Ilias M. <Mir...@um...> - 2013-03-28 06:45:09
|
Hi again, if you did not receive the attachement of my previous email, the files are here: https://docs.google.com/folder/d/0B8qBHKNhZAipZ2pnS0ViTUZBdXM/edit?usp=sharing The log of the simplest non-rendering formula: .. math:: \begin{array}{c} {\Psi}^{L} \\ {\Psi}^{S} \end{array} is as follows: ilias@miro_ilias_desktop:~/Dokumenty/Work/programming/sphinx-math-test/.sphinx-build . . Running Sphinx v1.1.3 loading pickled environment... not yet created No builder selected, using default: html building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done /usr/lib/pymodules/python2.7/matplotlib/sphinxext/mathmpl.py:56: Warning: Could not render math expression $\begin{array}{c}{\Psi}^{L} \\{\Psi}^{S}\end{array}$ Warning) # writing additional files... genindex search copying static files... done dumping search index... done dumping object inventory... done build succeeded. Best, Miro ________________________________________ From: Ilias Miroslav Sent: Wednesday, March 27, 2013 8:28 PM To: mat...@li... Subject: difficult LaTeX formula for rendering Dear experts, in our sphinx-based project documentation (www.diracprogram.org) we have a complicated latex math formula, which is not rendered: /usr/lib/pymodules/python2.7/matplotlib/sphinxext/mathmpl.py:56: Warning: Could not render math expression $i \hbar \frac{\partial}{\partial t} \left( \begin{array}{c}\Psi^L \\\Psi^S \end{array} \right) = c \left( \begin{array}{c}(\vec{\sigma} \cdot \vec{\pi}) \Psi^S \\(\vec{\sigma} \cdot \vec{\pi}) \Psi^L \end{array} \right)+ m_ec^2 \left( \begin{array}{c} \Psi^L \\-\Psi^S \end{array} \right) + V \left( \begin{array}{c}\Psi^L \\\Psi^S \end{array} \right)$ The index.rst file with the sole math formula is attached. I have most recent Ubuntu 12.10 (x86_64) with default packages python-sphinx 1.1.2, python-matplotlib 1.1.1. Any help, please ? I was trying to cut this formula down; the smallest LaTeX part not rendered is "\begin{array}{c}\Psi^L \\ \Psi^S \end{array}". Yours, Miro |
|
From: Jae-Joon L. <lee...@gm...> - 2013-03-28 03:41:31
|
The first issue is a bug, and I opened a PR that fixes this. https://github.com/matplotlib/matplotlib/pull/1864 In the comments of the PR, you can find a workaround. Regards, -JJ On Wed, Mar 27, 2013 at 11:09 PM, Hackstein <new...@gm...> wrote: > Sterling, > > I'm using matplotlib version 1.2.0 with agg backend. > > Here are two code examples, one for each problem. The first one doesn't > save the figure due to the legend problem, seterr causes the script to stop > with an error at that position. > The second example shows the scientific labels on the y-axis, although it > should be disabled in the code. I can't get the y-axis to display plain > labels. > > First example: > [code] > import numpy as np > np.seterr(all='raise') > import matplotlib.pyplot as plt > > x_i = [11.7574075935, 11.665207135799999, 11.6762413105, 11.6580992311, > 11.656368388500001] > x_r = [] > dates = [2.83611000e-01, 2.69330463e+02, 2.70280648e+02, > 2.71359248e+02, 2.72320822e+02] > > diff = 0.16 > ra = [0., 110.5349726] > dec = [0., -16.1061281] > med_i = np.median(x_i) > med_r = np.median(x_r) > > plt.figure("i_only", figsize=(14.40, 9.00), dpi=100) > if x_r == []: > plt.plot(dates, np.asarray(x_i), 'r-', label = 'i_s') > plt.title('i_mag', fontsize='16') > else: > plt.plot(dates, np.asarray(x_r), 'g-', label = 'r_s') > plt.plot(dates, np.asarray(x_i), 'r-', label = 'i_s') > plt.title('i_mag', fontsize='16') > plt.rcParams['xtick.major.pad']=10 > plt.rcParams['ytick.major.pad']=10 > ax = plt.gca() > ax.title.set_y(1.1) > formy = plt.ScalarFormatter() > formy.set_powerlimits((-5, 5)) > formy.set_scientific(False) > ax.yaxis.set_major_formatter(formy) > ax.set_ylim(ax.get_ylim()[::-1]) > for tick in ax.xaxis.get_major_ticks(): > tick.label.set_fontsize(16) > for tick in ax.yaxis.get_major_ticks(): > tick.label.set_fontsize(16) > plt.xlabel('Days', fontsize='20', labelpad=20) > plt.ylabel('normalized magnitude / mag', fontsize='20', labelpad=20) > > if x_r == []: > plt.legend(bbox_to_anchor=(0., 1.02, 1., 0.102), loc=3, mode='expand', > numpoints=1, ncol=2, borderaxespad=0.) > else: > plt.legend(bbox_to_anchor=(0., 1.02, 1., 0.102), loc=3, mode='expand', > numpoints=1, ncol=2, borderaxespad=0.) > leg = plt.gca().get_legend() > ltext = leg.get_texts() > plt.setp(ltext, fontsize='16') > plt.savefig('lc0.png', facecolor='white', bbox_inches='tight') > plt.close("i_only") > [/code] > > Second example: > [code] > import numpy as np > import matplotlib.pyplot as plt > > y_i = [11.1044563514, 11.1228276748, 11.1361234115, 11.1298162168, > 11.125134152199999] > y_r = [11.148667168999999, 11.10194503, 11.112352465300001, > 11.111687871799999, 11.1214449011] > dates_i = [2.83611000e-01, 2.69330463e+02, 2.70280648e+02, > 2.72320822e+02, 2.73250579e+02] > dates_r = [311.28215, 324.25844, 325.25194, 330.20983, 338.21356] > > diff = 0.16 > ra = [112.5379659, 110.5349726] > dec = [ -15.9841039, -16.1061281] > med_i = np.median(y_i) > med_r = np.median(y_r) > > plt.figure("i_only", figsize=(14.40, 9.00), dpi=100) > if y_r == []: > plt.plot(dates_i, np.asarray(y_i), 'r-', label = 'i_s') > plt.title('i_mag', fontsize='16') > else: > plt.plot(dates_r, np.asarray(y_r), 'g-', label = 'r_s') > plt.plot(dates_i, np.asarray(y_i), 'r-', label = 'i_s') > plt.title('i_mag', fontsize='16') > plt.rcParams['xtick.major.pad']=10 > plt.rcParams['ytick.major.pad']=10 > ax = plt.gca() > ax.title.set_y(1.1) > formy = plt.ScalarFormatter() > formy.set_powerlimits((-5, 5)) > formy.set_scientific(False) > ax.yaxis.set_major_formatter(formy) > ax.set_ylim(ax.get_ylim()[::-1]) > for tick in ax.xaxis.get_major_ticks(): > tick.label.set_fontsize(16) > for tick in ax.yaxis.get_major_ticks(): > tick.label.set_fontsize(16) > plt.xlabel('Days', fontsize='20', labelpad=20) > plt.ylabel('normalized magnitude / mag', fontsize='20', labelpad=20) > > if y_r == []: > plt.legend(bbox_to_anchor=(0., 1.02, 1., 0.102), loc=3, mode='expand', > numpoints=1, ncol=2, borderaxespad=0.) > else: > plt.legend(bbox_to_anchor=(0., 1.02, 1., 0.102), loc=3, mode='expand', > numpoints=1, ncol=2, borderaxespad=0.) > leg = plt.gca().get_legend() > ltext = leg.get_texts() > plt.setp(ltext, fontsize='16') > plt.savefig('lc0.png', facecolor='white', bbox_inches='tight') > plt.close("i_only") > [/code] > > Best regards, > > frix > > > Am 26.03.2013 um 20:36 schrieb Sterling Smith <sm...@fu...>: > > > Frix, > > > > It may be useful to post the version and backend you are using to the > list. > > > > import matplotlib > > print matplotlib.__version__ > > print matplotlib.get_backend() > > > > Also, if you can format the code as a simple self-contained example, > that would help others confirm what you are seeing. > > > > -Sterling > > > > On Mar 26, 2013, at 12:01PM, Hackstein wrote: > > > >> Hello everyone, > >> > >> I have two issues with my current projects: > >> > >> 1) I automatically generate plots of several data sets in a for-loop, > all of which have the same shape of x and y values, but some of which have > two of those data (i.e. graphs) sets per figure, others have only one. > >> I create the legend by > >> > >> plt.legend(bbox_to_anchor=(0., 1.02, 1., 0.102), loc=3, mode='expand', > numpoints=1, borderaxespad=0.) > >> > >> which works perfectly if I plot two data sets (and therefore two > labels) in a figure, but sometimes (not always) causes an error, if only > one data set is plotted in a figure. > >> The legend is this > >> > >> print ax.get_legend_handles_labels() > >> ([<matplotlib.lines.Line2D object at 0x24b9550>], ['i_s']) > >> > >> and the error is > >> > >> File "/usr/lib64/python2.6/site-packages/matplotlib/offsetbox.py", line > 76, in _get_packed_offsets > >> sep = (total - sum(w_list)) / (len(w_list) - 1.) > >> FloatingPointError: divide by zero encountered in double_scalars > >> > >> which I broke down to a problem with the" mode='expand'" parameter. It > seems it cannot expand when the number of labels is 1. Strangely, however, > that seems not always to be the case, since some of the plots with only one > data set and one legend entry work without problems, but some raise an > error. > >> > >> 2) Another problem occurs with the y-axis tick labels. Even if the > y-values are quite ordinary (in the order of 10) the labels get scientific > notation when the y-range is small (order 0.1). I don't know why that is > and it only occurs then. When the y-range is larger (order of 1), the ticks > get plain numbers. I tried to work around that with the following code, > which did not > >> work: > >> > >> plt.figure("i_only", figsize=(14.40, 9.00), dpi=100) > plt.plot(np.asarray(mod_mjd_list_i), np.asarray(x_i), 'r-', label = 'i_s') > ax = plt.gca() formy = plt.ScalarFormatter() formy.set_powerlimits((-5, 5)) > >> formy.set_scientific(False) > >> ax.yaxis.set_major_formatter(formy) > >> > >> Any ideas what I can do? > >> > >> Thanks, > >> frix > >> > >> > >> > ------------------------------------------------------------------------------ > >> Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d_______________________________________________ > >> Matplotlib-users mailing list > >> Mat...@li... > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Steven B. <bo...@ph...> - 2013-03-27 21:41:35
|
Yeah,
when I used my officemate's computer (matplotlib 1.1.1) it works
fine... I am running...
In [129]: import matplotlib
In [130]: matplotlib.__version__
Out[130]: '1.2.x'
Interesting...
Steven
On Wed Mar 27 16:29:53 2013, ChaoYue wrote:
> when saving as jpg, I cannot reproduce the problem.
> I am using version 1.2
>
> Chao
>
> On Wed, Mar 27, 2013 at 10:16 PM, Steven Boada [via matplotlib]
> <[hidden email] </user/SendEmail.jtp?type=node&node=40766&i=0>> wrote:
>
> Hey List,
>
> If you create a horizontal line, and then adjust the size of the
> figure, or axis limits the horizontal line does not move with
> everything else...
>
> To reproduce in ipython -pylab:
>
> axhline(5)
> yscale('log')
> ylim(0.5,30)
>
> The line stays where it started and is not moved when the plot is
> redrawn.
>
> This was discussed here (back in 2008!!!!!):
>
> http://matplotlib.1069221.n5.nabble.com/transforms-bug-axhline-with-log-y-scale-td35548.html
>
> Then... when you save the figure, the position of the horizontal
> line does *NOT* match the position you see when the figure is
> shown...
>
> savefig('test.eps')
>
> Am I missing something?
>
> Steven
>
> --
>
> Steven Boada
>
> Doctoral Student
> Dept of Physics and Astronomy
> Texas A&M University
> [hidden email] <http://user/SendEmail.jtp?type=node&node=40764&i=0>
>
>
> ------------------------------------------------------------------------------
>
> Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=40764&i=1>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://matplotlib.1069221.n5.nabble.com/problem-with-axhline-and-yscale-tp40764.html
>
> To start a new topic under matplotlib - users, email [hidden
> email] </user/SendEmail.jtp?type=node&node=40766&i=1>
> To unsubscribe from matplotlib, click here.
> NAML
> <http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
>
> --
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
> ************************************************************************************
>
> *figure_1.jpg* (149K) Download Attachment
> <http://matplotlib.1069221.n5.nabble.com/attachment/40766/0/figure_1.jpg>
>
> ------------------------------------------------------------------------
> View this message in context: Re: problem with axhline and yscale
> <http://matplotlib.1069221.n5.nabble.com/problem-with-axhline-and-yscale-tp40764p40766.html>
> Sent from the matplotlib - users mailing list archive
> <http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html> at
> Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Steven Boada
Doctoral Student
Dept of Physics and Astronomy
Texas A&M University
bo...@ph...
|
|
From: ChaoYue <cha...@gm...> - 2013-03-27 21:30:00
|
when saving as jpg, I cannot reproduce the problem.
I am using version 1.2
Chao
On Wed, Mar 27, 2013 at 10:16 PM, Steven Boada [via matplotlib] <
ml-...@n5...> wrote:
> Hey List,
>
> If you create a horizontal line, and then adjust the size of the figure,
> or axis limits the horizontal line does not move with everything else...
>
> To reproduce in ipython -pylab:
>
> axhline(5)
> yscale('log')
> ylim(0.5,30)
>
> The line stays where it started and is not moved when the plot is redrawn.
>
> This was discussed here (back in 2008!!!!!):
>
>
> http://matplotlib.1069221.n5.nabble.com/transforms-bug-axhline-with-log-y-scale-td35548.html
>
> Then... when you save the figure, the position of the horizontal line does
> *NOT* match the position you see when the figure is shown...
>
> savefig('test.eps')
>
> Am I missing something?
>
> Steven
>
> --
>
> Steven Boada
>
> Doctoral Student
> Dept of Physics and Astronomy
> Texas A&M University[hidden email] <http://user/SendEmail.jtp?type=node&node=40764&i=0>
>
>
> ------------------------------------------------------------------------------
>
> Own the Future-Intel® 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://p.sf.net/sfu/intel_levelupd2d
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=40764&i=1>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://matplotlib.1069221.n5.nabble.com/problem-with-axhline-and-yscale-tp40764.html
> To start a new topic under matplotlib - users, email
> ml-...@n5...
> To unsubscribe from matplotlib, click here<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2&code=Y2hhb3l1ZWpveUBnbWFpbC5jb218MnwxMzg1NzAzMzQx>
> .
> NAML<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
figure_1.jpg (149K) <http://matplotlib.1069221.n5.nabble.com/attachment/40766/0/figure_1.jpg>
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/problem-with-axhline-and-yscale-tp40764p40766.html
Sent from the matplotlib - users mailing list archive at Nabble.com. |