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
(14) |
2
(11) |
3
(5) |
4
(17) |
5
(11) |
6
(37) |
7
(35) |
8
(9) |
9
(1) |
10
(9) |
11
(7) |
12
(22) |
13
(34) |
14
(24) |
15
(27) |
16
(13) |
17
(19) |
18
(43) |
19
(36) |
20
(12) |
21
(9) |
22
(21) |
23
(3) |
24
(5) |
25
(30) |
26
(14) |
27
(23) |
28
(19) |
29
(19) |
30
(10) |
31
(6) |
|
|
|
|
|
|
On Thu, May 28, 2009 at 6:01 PM, Sandro Tosi <mo...@de...> wrote: > Hi Darren, > > On Thu, May 28, 2009 at 19:16, Darren Dale <dsd...@gm...> wrote: > > Try the attached script. > > Oh it works very great! thanks you very much! > > One thing I've done is also remove > > import matplotlib > matplotlib.use('Qt4Agg') > > since we're already importing the qt4agg backend directly right after. > > One only thing it's left a bit obscure (also because doc is a little > missing) is this piece of code: > > # update the data > self.line.set_ydata(np.sin(self.x+self.cnt/10.0)) > # just draw the animated artist > self.ax.draw_artist(self.line) > # just redraw the axes rectangle > self.blit(self.ax.bbox) > > first, I've not clear wat draw_artist and blit does, so if you can > shine some light on me :) > > Secondly, the "effect" I'd like to achieve is to update the current > line values and "replace" the current line with a new one. In this > code, instead, the line is plotted keeping the previous instances > around. So the effect is to fil the canvas with sin function plots > instead of updating only one instance. > > Do you know how to "fix" this? > Not off the top of my head. Maybe someone else on the list can offer a suggestion. Darren
Hi Darren, On Thu, May 28, 2009 at 19:16, Darren Dale <dsd...@gm...> wrote: > Try the attached script. Oh it works very great! thanks you very much! One thing I've done is also remove import matplotlib matplotlib.use('Qt4Agg') since we're already importing the qt4agg backend directly right after. One only thing it's left a bit obscure (also because doc is a little missing) is this piece of code: # update the data self.line.set_ydata(np.sin(self.x+self.cnt/10.0)) # just draw the animated artist self.ax.draw_artist(self.line) # just redraw the axes rectangle self.blit(self.ax.bbox) first, I've not clear wat draw_artist and blit does, so if you can shine some light on me :) Secondly, the "effect" I'd like to achieve is to update the current line values and "replace" the current line with a new one. In this code, instead, the line is plotted keeping the previous instances around. So the effect is to fil the canvas with sin function plots instead of updating only one instance. Do you know how to "fix" this? Thanks a lot for your support! :) -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi
The name of the Computer Modern Roman font that ships with matplotlib is "cmr10", so mpl.rc('font', family = 'serif', serif = 'cmr10') should work. Mike Nicolas Pourcelot wrote: > Hi, > > is there any way to use Computer Modern in any text in matplotlib ? > > In http://matplotlib.sourceforge.net/users/customizing.html, I read > the following : > > #font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif > #font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif > #font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive > #font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy > #font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace > > So, Computer Modern is not listed there. > > However, Computer Modern is used in mathtext, so I suppose there is a > way to use it also in plain text, but I can't figure it... > > I tried : > /mpl.rc('font', family = 'serif', serif = 'computer modern roman')/ > but it did not work. > > Thanks a lot, > > Nicolas P. > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Nicolas Pourcelot wrote: > Thanks for your answer. > > > Michael Droettboom a écrit : >> Handling this like an accent is trivial, and handled with the patch >> below (which I will commit to SVN). > It is however not so much useful, since \vec does already the job. The rightarrow is longer than vec. Much more suitable for multiple letters underneath. > >> Handling this in such a way that the length of the arrow changes >> based on the size of the underlying text is less straightforward and >> will take some time to implement. > This is what I meant, yes. > Hope you will success, I miss it quite a lot for now. I'll get to this when I have the time. Cheers, Mike > >> Cheers, >> Mike >> >> Index: lib/matplotlib/mathtext.py >> =================================================================== >> --- lib/matplotlib/mathtext.py (revision 7148) >> +++ lib/matplotlib/mathtext.py (working copy) >> @@ -2445,7 +2445,9 @@ >> r"'" : r'\combiningacuteaccent', >> r'~' : r'\combiningtilde', >> r'.' : r'\combiningdotabove', >> - r'^' : r'\circumflexaccent' >> + r'^' : r'\circumflexaccent', >> + r'overrightarrow' : r'\rightarrow', >> + r'overleftarrow' : r'\leftarrow' >> } >> >> _wide_accents = set(r"widehat widetilde".split()) >> >> Nicolas Pourcelot wrote: >>> Hi, >>> >>> is there any way to display a big arrow on a vector using mathtext, >>> like "$\overrightarrow{AB}$" ? >>> >>> If not, is there any plan to implement it in a next release ? >>> >>> Thanks a lot, >>> >>> Nicolas P. >>> >>> ------------------------------------------------------------------------------ >>> >>> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT >>> is a gathering of tech-side developers & brand creativity >>> professionals. Meet >>> the minds behind Google Creative Lab, Visual Complexity, Processing, >>> & iPhoneDevCamp as they present alongside digital heavyweights like >>> Barbarian Group, R/GA, & Big Spaceship. >>> http://p.sf.net/sfu/creativitycat-com >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>
Thanks for your answer. Michael Droettboom a écrit : > Handling this like an accent is trivial, and handled with the patch > below (which I will commit to SVN). It is however not so much useful, since \vec does already the job. > Handling this in such a way that the length of the arrow changes based > on the size of the underlying text is less straightforward and will > take some time to implement. This is what I meant, yes. Hope you will success, I miss it quite a lot for now. Thanks again, Nicolas > Cheers, > Mike > > Index: lib/matplotlib/mathtext.py > =================================================================== > --- lib/matplotlib/mathtext.py (revision 7148) > +++ lib/matplotlib/mathtext.py (working copy) > @@ -2445,7 +2445,9 @@ > r"'" : r'\combiningacuteaccent', > r'~' : r'\combiningtilde', > r'.' : r'\combiningdotabove', > - r'^' : r'\circumflexaccent' > + r'^' : r'\circumflexaccent', > + r'overrightarrow' : r'\rightarrow', > + r'overleftarrow' : r'\leftarrow' > } > > _wide_accents = set(r"widehat widetilde".split()) > > Nicolas Pourcelot wrote: >> Hi, >> >> is there any way to display a big arrow on a vector using mathtext, >> like "$\overrightarrow{AB}$" ? >> >> If not, is there any plan to implement it in a next release ? >> >> Thanks a lot, >> >> Nicolas P. >> >> ------------------------------------------------------------------------------ >> >> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT >> is a gathering of tech-side developers & brand creativity >> professionals. Meet >> the minds behind Google Creative Lab, Visual Complexity, Processing, >> & iPhoneDevCamp as they present alongside digital heavyweights like >> Barbarian Group, R/GA, & Big Spaceship. >> http://p.sf.net/sfu/creativitycat-com >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >
Hi Sandro, On Wed, May 27, 2009 at 7:14 PM, Sandro Tosi <mo...@de...> wrote: > Hi Darren, > thanks for replying > > On Wed, May 27, 2009 at 21:01, Darren Dale <dsd...@gm...> wrote: > > On Wed, May 27, 2009 at 9:11 AM, Sandro Tosi <mo...@de...> wrote: > >> > >> Hi all, > >> I'd like to adapt 'animation_blit_qt4.py' to a pure OO approach, > >> removing pylab from the code and move to something near to > >> 'embedding_in_qt4.py'. > >> > >> I tried a bit but failed miserably :( > >> > >> What I'd like to achieve is use something like in > >> 'embedding_in_qt4.py' but that can be updated using the timerEvent / > >> startTime paradigm (something similar to gobject.add_idle(func) but > >> this time for Qt4). > >> > >> Can someone please give me a help on this? > > > > Can you be more specific? Maybe post what you have along with a > description > > of how it is failing? > > Eheh, sorry for being so generic: I wrote that email from work, while > the code I've worked on was at home ;) > > So, the situation is this: > > - animation_blit_qt4.py has a nice way to update the graph "online", > using the timerEvent/startTimer > - animation_blit_qt4.py contains pylab staff (I want to avoid using) > - animation_blit_qt4.py uses the backend Qt4Agg not the backend object > - embedding_in_qt4.py uses an OO approach at embedding mpl in a qt4 > widget/application. > > The ultimate result I want to achieve is to embed mpl in a qt4 > application but update the graph in realtime. > > So I started modifying animation_blit_qt4.py to make it "more OO" :) > > The attached script "animation_blit_qt4_morph.py" only replaced the > pylab parts with a mix of OO style and pyplot, and the timerEvent just > print the receive event without updating the graph. > > As you can see, not much of what I need :( > > What I'd like to achive is something similar to > "embedding_in_qt4_morph.py" but where the graph is updated > automatically like in an animation. > > Your help will be appreciated a lot :) > Try the attached script. Darren
Oh, removing .matplotlib/matplotlibrc solved this issue. The content of matplotlibrc was really simple, though: -- font.size : 8.0 # # The figure subplot parameters. All dimensions are fraction of the # figure width or height # #figure.subplot.left : 0.125 # the left side of the subplots of the figure #figure.subplot.right : 0.9 # the right side of the subplots of the figure #figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure #figure.subplot.top : 0.9 # the top of the subplots of the figure #figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots #figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots figure.subplot.hspace : 0.3 # the amount of height reserved for white space between subplots -- Regards
Handling this like an accent is trivial, and handled with the patch below (which I will commit to SVN). Handling this in such a way that the length of the arrow changes based on the size of the underlying text is less straightforward and will take some time to implement. Cheers, Mike Index: lib/matplotlib/mathtext.py =================================================================== --- lib/matplotlib/mathtext.py (revision 7148) +++ lib/matplotlib/mathtext.py (working copy) @@ -2445,7 +2445,9 @@ r"'" : r'\combiningacuteaccent', r'~' : r'\combiningtilde', r'.' : r'\combiningdotabove', - r'^' : r'\circumflexaccent' + r'^' : r'\circumflexaccent', + r'overrightarrow' : r'\rightarrow', + r'overleftarrow' : r'\leftarrow' } _wide_accents = set(r"widehat widetilde".split()) Nicolas Pourcelot wrote: > Hi, > > is there any way to display a big arrow on a vector using mathtext, like > "$\overrightarrow{AB}$" ? > > If not, is there any plan to implement it in a next release ? > > Thanks a lot, > > Nicolas P. > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Ole wrote: My interpretation of this is: - the FigureCanvas gets the first resize event and repaints itself (*) - during the repaint it gets the second resize event - since it is already in the repaint process, the second request is ignored (or queued) and returns immediately - this leads to the processing of the second resize for the scrollbar - after the first repaint (*) is finished, the first resize of the scrollbar is started Remember, this is not a multi-threaded system. You can't receive a second repaint event while the drawing code is happening because the event loop is not in a separate thread. You can make calls that will put a repaint event on the X event queue. When the resize code is finished, the event queue will then be processed in the order they were received. I'd guess that something in your repaint/drawing code is changing the size of the widgets which is probably should not be doing. From: Darren Dale [mailto:dsd...@gm...] Sent: Thursday, May 28, 2009 8:57 AM To: Ole Streicher Cc: mat...@li... Subject: Re: [Matplotlib-users] Strange resize behaviour for qt backend On Thu, May 28, 2009 at 7:55 AM, Ole Streicher <ole...@gm...<mailto:ole...@gm...>> wrote: Hi again, is there no idea on this topic? Does the update work for you as it should? I am really busy with other things, and can't offer suggestions unless you post a short, simple, standalone script that demonstrates the problem. Darren I started to debugging it a bit by adding debug output to the moveEvent()/resizeEvent() functions. I seems that the resizeEvents (resp. moveEvents) come out of order. The following comes when one resizes the window width: figure resize to PyQt4.QtCore.QSize(803, 474) <-- first event figure resize to PyQt4.QtCore.QSize(879, 474) <-- second event scroll resize to PyQt4.QtCore.QSize(879, 15) <-- second event (wrong!!) scroll resize to PyQt4.QtCore.QSize(803, 15) <-- first event My interpretation of this is: - the FigureCanvas gets the first resize event and repaints itself (*) - during the repaint it gets the second resize event - since it is already in the repaint process, the second request is ignored (or queued) and returns immediately - this leads to the processing of the second resize for the scrollbar - after the first repaint (*) is finished, the first resize of the scrollbar is started Who should be blamed for that? Is it - Qt since they dont distribute the events in the order of occurrence to the layout childs? - or FigureCanvas since it returns from the secons call while the first one is not finished yet? How can I workaround this? Best regards, Ole Ole Streicher <ole...@gm...<mailto:ole...@gm...>> writes: > Hi, > > I am using matplotlib for some data vizualization. To ensure a > consistent user interface among the whole application, I do the > scrolling/zooming stuff myself. So, for a diagram, a horizontal > scrollbar is displayed below the diagram that enabled to shift along the > x axis. This is (part of) the code: > > ------------------------8<----------------------------------------------- > from PyQt4 import QtGui, QtCore > from matplotlib.figure import Figure,SubplotParams > > class DiagramWidget(QtGui.QWidget): > def __init__(self, parent): > QtGui.QWidget.__init__(self, parent) > layout = QtGui.QVBoxLayout(self) > self.diagram = InnerDiagramWidget(self) > self.scrollbar = QtGui.QScrollBar(QtCore.Qt.Horizontal, self) > self.connect(self.scrollbar, QtCore.SIGNAL('valueChanged(int)'), > self.diagram.scroll_event) > layout.addWidget(self.diagram) > layout.addWidget(self.scrollbar) > # ... > > class InnerDiagramWidget(FigureCanvas): > def __init__(self, parent): > fig = Figure(facecolor = 'w', > subplotpars = SubplotParams(left = 0.08, right=0.96, > bottom = 0.1, top=0.98)) > self.axes = fig.add_subplot(111) > FigureCanvas.__init__(self, fig) > FigureCanvas.setParent(self, parent) > FigureCanvas.setSizePolicy(self, > QtGui.QSizePolicy.Expanding, > QtGui.QSizePolicy.Expanding) > FigureCanvas.updateGeometry(self) > > def scroll_event(self, x): > pass # here is real code ofcourse > # ... > ------------------------8<----------------------------------------------- > > However, when I put this DiagramWidget into a window and try to resize > it vertically by mouse (with some data ... about 4000 points), the > scrollbar is not alwas shown correctly. > > One can see that the diagram widget size does not change with every mouse > move, and the scrollbar sometimes goes out of the visible window, where > it is unusable. > > The similar occurres in the horizontal direction: sometimes the > scrollbar gets not updated properly. This is the case when the Figure > canvas takes a long time for update. > > If I put the scrollbar on top of the widget, everything is fine, except > that is the wrong place for a scrollbar :-) > > Is this a bug in FigureCanvas, in Qt or in my code? How can I debug and > solve this? > > Best regards > > Ole > > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Matplotlib-users mailing list Mat...@li...<mailto:Mat...@li...> https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- "In our description of nature, the purpose is not to disclose the real essence of the phenomena but only to track down, so far as it is possible, relations between the manifold aspects of our experience" - Niels Bohr "It is a bad habit of physicists to take their most successful abstractions to be real properties of our world." - N. David Mermin "Once we have granted that any physical theory is essentially only a model for the world of experience, we must renounce all hope of finding anything like the correct theory ... simply because the totality of experience is never accessible to us." - Hugh Everett III No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.43/2138 - Release Date: 05/27/09 18:21:00
Hi, is there any way to use Computer Modern in any text in matplotlib ? In http://matplotlib.sourceforge.net/users/customizing.html, I read the following : #font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif #font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif #font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive #font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy #font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace So, Computer Modern is not listed there. However, Computer Modern is used in mathtext, so I suppose there is a way to use it also in plain text, but I can't figure it... I tried : /mpl.rc('font', family = 'serif', serif = 'computer modern roman')/ but it did not work. Thanks a lot, Nicolas P.
On Thu, May 28, 2009 at 7:55 AM, Ole Streicher <ole...@gm...>wrote: > Hi again, > > is there no idea on this topic? Does the update work for you as it > should? > I am really busy with other things, and can't offer suggestions unless you post a short, simple, standalone script that demonstrates the problem. Darren > > I started to debugging it a bit by adding debug output to the > moveEvent()/resizeEvent() functions. I seems that the resizeEvents > (resp. moveEvents) come out of order. The following comes when one > resizes the window width: > > figure resize to PyQt4.QtCore.QSize(803, 474) <-- first event > figure resize to PyQt4.QtCore.QSize(879, 474) <-- second event > scroll resize to PyQt4.QtCore.QSize(879, 15) <-- second event (wrong!!) > scroll resize to PyQt4.QtCore.QSize(803, 15) <-- first event > > My interpretation of this is: > - the FigureCanvas gets the first resize event and repaints itself (*) > - during the repaint it gets the second resize event > - since it is already in the repaint process, the second request > is ignored (or queued) and returns immediately > - this leads to the processing of the second resize for the scrollbar > - after the first repaint (*) is finished, the first resize of the > scrollbar is started > > Who should be blamed for that? Is it > - Qt since they dont distribute the events in the order of occurrence to > the layout childs? > - or FigureCanvas since it returns from the secons call while the first > one is not finished yet? > > How can I workaround this? > > Best regards, > > Ole > > Ole Streicher <ole...@gm...> writes: > > Hi, > > > > I am using matplotlib for some data vizualization. To ensure a > > consistent user interface among the whole application, I do the > > scrolling/zooming stuff myself. So, for a diagram, a horizontal > > scrollbar is displayed below the diagram that enabled to shift along the > > x axis. This is (part of) the code: > > > > ------------------------8<----------------------------------------------- > > from PyQt4 import QtGui, QtCore > > from matplotlib.figure import Figure,SubplotParams > > > > class DiagramWidget(QtGui.QWidget): > > def __init__(self, parent): > > QtGui.QWidget.__init__(self, parent) > > layout = QtGui.QVBoxLayout(self) > > self.diagram = InnerDiagramWidget(self) > > self.scrollbar = QtGui.QScrollBar(QtCore.Qt.Horizontal, self) > > self.connect(self.scrollbar, QtCore.SIGNAL('valueChanged(int)'), > > self.diagram.scroll_event) > > layout.addWidget(self.diagram) > > layout.addWidget(self.scrollbar) > > # ... > > > > class InnerDiagramWidget(FigureCanvas): > > def __init__(self, parent): > > fig = Figure(facecolor = 'w', > > subplotpars = SubplotParams(left = 0.08, right=0.96, > > bottom = 0.1, top=0.98)) > > self.axes = fig.add_subplot(111) > > FigureCanvas.__init__(self, fig) > > FigureCanvas.setParent(self, parent) > > FigureCanvas.setSizePolicy(self, > > QtGui.QSizePolicy.Expanding, > > QtGui.QSizePolicy.Expanding) > > FigureCanvas.updateGeometry(self) > > > > def scroll_event(self, x): > > pass # here is real code ofcourse > > # ... > > ------------------------8<----------------------------------------------- > > > > However, when I put this DiagramWidget into a window and try to resize > > it vertically by mouse (with some data ... about 4000 points), the > > scrollbar is not alwas shown correctly. > > > > One can see that the diagram widget size does not change with every mouse > > move, and the scrollbar sometimes goes out of the visible window, where > > it is unusable. > > > > The similar occurres in the horizontal direction: sometimes the > > scrollbar gets not updated properly. This is the case when the Figure > > canvas takes a long time for update. > > > > If I put the scrollbar on top of the widget, everything is fine, except > > that is the wrong place for a scrollbar :-) > > > > Is this a bug in FigureCanvas, in Qt or in my code? How can I debug and > > solve this? > > > > Best regards > > > > Ole > > > > > > > ------------------------------------------------------------------------------ > > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > > is a gathering of tech-side developers & brand creativity professionals. > Meet > > the minds behind Google Creative Lab, Visual Complexity, Processing, & > > iPhoneDevCamp as they present alongside digital heavyweights like > Barbarian > > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > > > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. > Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- "In our description of nature, the purpose is not to disclose the real essence of the phenomena but only to track down, so far as it is possible, relations between the manifold aspects of our experience" - Niels Bohr "It is a bad habit of physicists to take their most successful abstractions to be real properties of our world." - N. David Mermin "Once we have granted that any physical theory is essentially only a model for the world of experience, we must renounce all hope of finding anything like the correct theory ... simply because the totality of experience is never accessible to us." - Hugh Everett III
Hi again, is there no idea on this topic? Does the update work for you as it should? I started to debugging it a bit by adding debug output to the moveEvent()/resizeEvent() functions. I seems that the resizeEvents (resp. moveEvents) come out of order. The following comes when one resizes the window width: figure resize to PyQt4.QtCore.QSize(803, 474) <-- first event figure resize to PyQt4.QtCore.QSize(879, 474) <-- second event scroll resize to PyQt4.QtCore.QSize(879, 15) <-- second event (wrong!!) scroll resize to PyQt4.QtCore.QSize(803, 15) <-- first event My interpretation of this is: - the FigureCanvas gets the first resize event and repaints itself (*) - during the repaint it gets the second resize event - since it is already in the repaint process, the second request is ignored (or queued) and returns immediately - this leads to the processing of the second resize for the scrollbar - after the first repaint (*) is finished, the first resize of the scrollbar is started Who should be blamed for that? Is it - Qt since they dont distribute the events in the order of occurrence to the layout childs? - or FigureCanvas since it returns from the secons call while the first one is not finished yet? How can I workaround this? Best regards, Ole Ole Streicher <ole...@gm...> writes: > Hi, > > I am using matplotlib for some data vizualization. To ensure a > consistent user interface among the whole application, I do the > scrolling/zooming stuff myself. So, for a diagram, a horizontal > scrollbar is displayed below the diagram that enabled to shift along the > x axis. This is (part of) the code: > > ------------------------8<----------------------------------------------- > from PyQt4 import QtGui, QtCore > from matplotlib.figure import Figure,SubplotParams > > class DiagramWidget(QtGui.QWidget): > def __init__(self, parent): > QtGui.QWidget.__init__(self, parent) > layout = QtGui.QVBoxLayout(self) > self.diagram = InnerDiagramWidget(self) > self.scrollbar = QtGui.QScrollBar(QtCore.Qt.Horizontal, self) > self.connect(self.scrollbar, QtCore.SIGNAL('valueChanged(int)'), > self.diagram.scroll_event) > layout.addWidget(self.diagram) > layout.addWidget(self.scrollbar) > # ... > > class InnerDiagramWidget(FigureCanvas): > def __init__(self, parent): > fig = Figure(facecolor = 'w', > subplotpars = SubplotParams(left = 0.08, right=0.96, > bottom = 0.1, top=0.98)) > self.axes = fig.add_subplot(111) > FigureCanvas.__init__(self, fig) > FigureCanvas.setParent(self, parent) > FigureCanvas.setSizePolicy(self, > QtGui.QSizePolicy.Expanding, > QtGui.QSizePolicy.Expanding) > FigureCanvas.updateGeometry(self) > > def scroll_event(self, x): > pass # here is real code ofcourse > # ... > ------------------------8<----------------------------------------------- > > However, when I put this DiagramWidget into a window and try to resize > it vertically by mouse (with some data ... about 4000 points), the > scrollbar is not alwas shown correctly. > > One can see that the diagram widget size does not change with every mouse > move, and the scrollbar sometimes goes out of the visible window, where > it is unusable. > > The similar occurres in the horizontal direction: sometimes the > scrollbar gets not updated properly. This is the case when the Figure > canvas takes a long time for update. > > If I put the scrollbar on top of the widget, everything is fine, except > that is the wrong place for a scrollbar :-) > > Is this a bug in FigureCanvas, in Qt or in my code? How can I debug and > solve this? > > Best regards > > Ole > > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
Hi, is there any way to display a big arrow on a vector using mathtext, like "$\overrightarrow{AB}$" ? If not, is there any plan to implement it in a next release ? Thanks a lot, Nicolas P.
Hi Chris: Thanks for your answer! I try the printing_in_wx.py with Python 2.5, MPlot 0.8 and wxPython 2.8.7.1. and its just crashes after I want to print or preview (unfortunately without any error message) and closes Python. Here's an example of my program: # -*- coding: latin1 -*- import sys import os import wx import wx.lib.scrolledpanel as SP from wx.lib.mixins.listctrl import CheckListCtrlMixin import wx.lib.mixins.listctrl as listmix import pylab from matplotlib.backends.backend_wx import FigureCanvasWx from matplotlib.font_manager import fontManager, FontProperties class CheckListCtrl(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin): def __init__(self, parent, nr): wx.ListCtrl.__init__(self, parent, -1, size=(900, ((nr*8)+50)), style=wx.LC_REPORT|wx.LC_VRULES|wx.LC_HRULES) listmix.ListCtrlAutoWidthMixin.__init__(self) class MyFrame(wx.Frame, listmix.ColumnSorterMixin): def __init__(self): wx.Frame.__init__(self, None, -1, "Results", size=(300, 300)) self.panel = SP.ScrolledPanel(self, -1) self.panel.SetBackgroundColour('WHITE') d = {1:('test','22')} nr = 1 self.list = CheckListCtrl(self.panel, nr) self.list.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL)) self.b = wx.Button(self.panel, 10, "Copy to clipboard") self.b.SetFont(wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL)) self.Bind(wx.EVT_BUTTON, self.to_clipboard, self.b) l1 = wx.StaticText(self.panel, -1, "RNAi Scan Results") l1.SetFont(wx.Font(16, wx.SWISS, wx.NORMAL, wx.NORMAL)) dummy = wx.StaticText(self.panel, -1, "") self.fig = pylab.figure(figsize=(10,8)) self.fig.subplots_adjust(hspace = 0.5, left=0.07, right=0.95, top=0.93) self.canvas = FigureCanvasWx(self.panel, -1, self.fig) self.vbox = wx.BoxSizer(wx.VERTICAL) sizer = wx.GridBagSizer(hgap = 10, vgap = 10) sizer.Add(l1, pos = (0, 1), flag = wx.ALIGN_CENTER) sizer.Add(self.list, pos = (1, 1), span = (2,1), flag = wx.EXPAND|wx.GROW|wx.ALIGN_CENTER) sizer.Add(self.b, pos = (1, 2)) sizer.Add(self.canvas, pos = (3, 1), flag = wx.EXPAND|wx.GROW|wx.ALIGN_CENTER) sizer.Add(dummy, pos = (4, 1), flag = wx.EXPAND|wx.GROW|wx.ALIGN_CENTER) self.vbox.Add(sizer, 1, wx.ALL|wx.ALIGN_CENTER,10) self.panel.SetSizer(self.vbox) self.panel.SetAutoLayout(1) self.panel.SetupScrolling() self.list.InsertColumn(0, "ID") self.list.InsertColumn(1, "All Hits") self.list.InsertColumn(2, "Efficient Hits") for key, data in d.iteritems(): index = self.list.InsertStringItem(sys.maxint, data[0]) self.list.SetStringItem(index, 1, data[1]) self.list.SetItemData(index, key) self.list.SetColumnWidth(0, 200) self.list.SetColumnWidth(1, 100) self.list.SetColumnWidth(2, 150) self.Show() self.ShowFullScreen(True, style = wx.FULLSCREEN_NOMENUBAR) self.Build_Menus() self.plot_data(self.fig) def Build_Menus(self): """ build menus """ MENU_EXIT = wx.NewId() MENU_SAVE = wx.NewId() MENU_PRINT = wx.NewId() MENU_PSETUP= wx.NewId() MENU_PREVIEW=wx.NewId() MENU_CLIPB =wx.NewId() MENU_HELP =wx.NewId() menuBar = wx.MenuBar() f0 = wx.Menu() f0.Append(MENU_SAVE, "&Export", "Save Image of Plot") f0.AppendSeparator() f0.Append(MENU_PSETUP, "Page Setup...", "Printer Setup") f0.Append(MENU_PREVIEW,"Print Preview...", "Print Preview") f0.Append(MENU_PRINT, "&Print", "Print Plot") f0.AppendSeparator() f0.Append(MENU_EXIT, "E&xit", "Exit") menuBar.Append(f0, "&File"); f1 = wx.Menu() f1.Append(MENU_HELP, "Quick Reference", "Quick Reference") menuBar.Append(f1, "&Help"); self.SetMenuBar(menuBar) self.Bind(wx.EVT_MENU, self.onPrint, id=MENU_PRINT) self.Bind(wx.EVT_MENU, self.onPrinterSetup, id=MENU_PSETUP) self.Bind(wx.EVT_MENU, self.onPrinterPreview, id=MENU_PREVIEW) self.Bind(wx.EVT_MENU, self.save, id=MENU_SAVE) self.Bind(wx.EVT_MENU, self.onExit , id=MENU_EXIT) self.Bind(wx.EVT_MENU, self.onHelp, id=MENU_HELP) def onPrinterSetup(self,event=None): self.canvas.Printer_Setup(event=event) def onPrinterPreview(self,event=None): self.canvas.Printer_Preview(event=event) def onPrint(self,event=None): self.canvas.Printer_Print(event=event) def onHelp(self, event=None): pass def onExit(self,event=None): self.Destroy() def save(self, event): pass def to_clipboard(self, evt): f = open("data_hits.txt", "r") msg = 'Id' + '\t' + 'All Hits' + '\t' 'Eff Hits' + '\n' + f.read() f.close() data = wx.TextDataObject() data.SetText(msg) if wx.TheClipboard.Open(): wx.TheClipboard.SetData(data) wx.TheClipboard.Flush() wx.TheClipboard.Close() def plot_data(self, figure): query_plot = figure.add_subplot(1, 1, 1) listex = [0,1,2,3] listey = [0,1,2,3] query_plot.plot(listex,listey) if __name__ == '__main__': app = wx.PySimpleApp() frame = MyFrame() frame.Show(True) app.MainLoop() ----- Original Message ----- From: "Christopher Barker" <Chr...@no...> To: "matplotlib-users" <mat...@li...> Sent: Wednesday, May 27, 2009 6:28 PM Subject: Re: [Matplotlib-users] Printing in wx Stefanie Lück wrote: > I'm trying to print my plots in a wxScrolledPanel under Windows XP but > it dosen't work. I only can print / preview the start of the plot on the > left upper site, the rest of page is empty: I wonder if that has to do with how you are using the scolledpanel, and DCs. Post a sample (as a as-small-as-possible-running-app, if you can), and we can take a look. > I used printing according the example of matplotlib printing_in_wx.py. > BTW if I want to run this demo, Python crashes. it works fine for me on OS-X What messages to you get with your crash? What versions of Python, wxPython and MPL are you running? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Dear all, When writing: f = figure() ... gl = f.gca().get_xgridlines() I always get a list of gridlines independantly of the fact that they are actually drawn or not. Is there an attribute or a method that could inform me whether the gridlines are actually displayed or not ? I thougt that the method "get_visible" could do the job but it seems to do an unrelated task. thank you very much Eric
Dear all, When writing: f = figure() ... gl = f.gca().get_xgridlines() I always get a list of gridlines independantly of the fact that they are actually drawn or not. Is there an attribute or a method that could inform me whether the gridlines are actually displayed or not ? I thougt that the method "get_visible" could do the job but it seems to do an unrelated task. thank you very much Eric
Hello matplotlib users, Using the source tarball on sourceforge (0.98.5.3), having pyqt-4.4.4 working, pyobjc-2.2b2 too (for GUI), but no pygtk at all, pylab does not work (a pylab based script simply display nothing, not even create a window). Embedding in QT4 works fine. even when using pythonw. During build, everything went fine except for those two libraries, for which some dependencies were not fat binaries (both ppc and intel binaries). I've compiled by hand using the following (the original compiler invocation had "-arch ppc" as the first arg, it has been removed). Not: I'm on OSX 10.5 Anyone with the same issue? (note: it was working fine with python 2.5.2 from python.org) g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-fat-2.6/src/ft2font.o build/temp.macosx-10.3-fat-2.6/src/mplutils.o build/temp.macosx-10.3-fat-2.6/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.6/CXX/cxx_extensions.o build/temp.macosx-10.3-fat-2.6/CXX/cxxsupport.o build/temp.macosx-10.3-fat-2.6/CXX/cxxextensions.o -L/opt/local/lib -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lz -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.6/matplotlib/ft2font.so g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-fat-2.6/src/_png.o build/temp.macosx-10.3-fat-2.6/src/mplutils.o build/temp.macosx-10.3-fat-2.6/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.6/CXX/cxx_extensions.o build/temp.macosx-10.3-fat-2.6/CXX/cxxsupport.o build/temp.macosx-10.3-fat-2.6/CXX/cxxextensions.o -L/opt/local/lib -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lpng12 -lz -lz -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.6/matplotlib/_png.so
jinbo wang wrote: > Hi dear users, > Recently I found pcolor took tremendously longer to draw a figure > than contour or imshow. I am wondering if anyone had the same > experience, or anyone knows why? Thank you very much! Yes, pcolor is inherently very slow, but flexible. Imshow is very fast, but restricted in some ways (rectangular grid), flexible in others (it has a ridiculous number of interpolation options). Contouring is a completely different sort of operation. Pcolor is slow because it uses a patch collection, which is not very quick to render; imshow goes straight to C++ code for rendering, and because of the simplicity of the imshow input, that code can be highly optimized. You might try substituting pcolormesh for pcolor. It is not quite a general and flexible, but it is much more highly optimized for rendering with Agg. Eric > Jinbo > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Hi dear users, Recently I found pcolor took tremendously longer to draw a figure than contour or imshow. I am wondering if anyone had the same experience, or anyone knows why? Thank you very much! Jinbo