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: Adam H. <hug...@gm...> - 2014-02-17 19:41:22
|
I'm wondering if the matplotlib API is designed in such a way that choosing a color schema could be done at import time. I know that the entire plot style can be changed in one call (eg put plt.xkcd() at the beginning of your code), so I wander if colorblind-compatible colors could be loaded in a similar, quick way. On Mon, Feb 17, 2014 at 1:52 PM, ChaoYue <cha...@gm...> wrote: > Hi Gabriele, > > I'm afraid you have to put the numbers by yourself using the plt.text, as > in an example: > a = np.arange(10) > b = np.tile(a,(10,1)) > c = np.tile(a[:,np.newaxis],(10)) + b > plot(c) > for i in range(10): > plt.text(5,c[i][5],str(i)) > > > I've askd by a review to use the colorblind compatible colors when trying > to submit a paper, > and I find a website below: > http://jfly.iam.u-tokyo.ac.jp/color/ > > I put some RGB numbers for some colors here if you feel like to have a try: > CCC = > { > > 'Black':np.array([0,0,0])/255., > > 'Orange':np.array([230,159,0])/255., > > 'Skyblue':np.array([85,180,233])/255., > > 'BluishGreen':np.array([0,158,115])/255., > > 'Yellow':np.array([240,228,66])/255., > > 'Blue':np.array([0,114,178])/255., > > 'Vermilion':np.array([213,94,0])/255., > > 'ReddishPurple':np.array([204,121,167])/255. > } > > Cheers, > > Chao > > > > On Mon, Feb 17, 2014 at 7:17 PM, Gabriele Brambilla [via matplotlib] <[hidden > email] <http://user/SendEmail.jtp?type=node&node=42886&i=0>> wrote: > >> Hi, >> I'm dealing with a guy that is colorblind. >> Have you got any suggestion on how could I show a plot like the one >> attached to him? >> Is there an option in pyplot that write little numbers near the curves >> instead of colors? >> >> thanks >> >> Gabriele >> >> ------------------------------------------------------------------------------ >> >> Managing the Performance of Cloud-Based Applications >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >> Read the Whitepaper. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-users mailing list >> [hidden email] <http://user/SendEmail.jtp?type=node&node=42884&i=0> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> *daltonic.png* (181K) Download Attachment<http://matplotlib.1069221.n5.nabble.com/attachment/42884/0/daltonic.png> >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> http://matplotlib.1069221.n5.nabble.com/colorbllind-problem-tp42884.html >> To start a new topic under matplotlib - users, email [hidden email]<http://user/SendEmail.jtp?type=node&node=42886&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 > > ************************************************************************************ > > ------------------------------ > View this message in context: Re: colorbllind problem<http://matplotlib.1069221.n5.nabble.com/colorbllind-problem-tp42884p42886.html> > Sent from the matplotlib - users mailing list archive<http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html>at Nabble.com. > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: ChaoYue <cha...@gm...> - 2014-02-17 18:53:05
|
Hi Gabriele,
I'm afraid you have to put the numbers by yourself using the plt.text, as
in an example:
a = np.arange(10)
b = np.tile(a,(10,1))
c = np.tile(a[:,np.newaxis],(10)) + b
plot(c)
for i in range(10):
plt.text(5,c[i][5],str(i))
I've askd by a review to use the colorblind compatible colors when trying
to submit a paper,
and I find a website below:
http://jfly.iam.u-tokyo.ac.jp/color/
I put some RGB numbers for some colors here if you feel like to have a try:
CCC =
{
'Black':np.array([0,0,0])/255.,
'Orange':np.array([230,159,0])/255.,
'Skyblue':np.array([85,180,233])/255.,
'BluishGreen':np.array([0,158,115])/255.,
'Yellow':np.array([240,228,66])/255.,
'Blue':np.array([0,114,178])/255.,
'Vermilion':np.array([213,94,0])/255.,
'ReddishPurple':np.array([204,121,167])/255.
}
Cheers,
Chao
On Mon, Feb 17, 2014 at 7:17 PM, Gabriele Brambilla [via matplotlib] <
ml-...@n5...> wrote:
> Hi,
> I'm dealing with a guy that is colorblind.
> Have you got any suggestion on how could I show a plot like the one
> attached to him?
> Is there an option in pyplot that write little numbers near the curves
> instead of colors?
>
> thanks
>
> Gabriele
>
> ------------------------------------------------------------------------------
>
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=42884&i=0>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> *daltonic.png* (181K) Download Attachment<http://matplotlib.1069221.n5.nabble.com/attachment/42884/0/daltonic.png>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://matplotlib.1069221.n5.nabble.com/colorbllind-problem-tp42884.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
************************************************************************************
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/colorbllind-problem-tp42884p42886.html
Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Pierre H. <pie...@cr...> - 2014-02-17 18:37:51
|
Le 17/02/2014 18:13, Eric Firing a écrit : >> > I was then wondering : >> > 1) is this solution recommended or not ? >> > 2) is there a shortcup to avoird the five "dots" ? > http://matplotlib.org/api/pyplot_api.html?highlight=locator_params#matplotlib.pyplot.locator_params > > This is both a pyplot function and an Axes method. Thanks a lot! I guess it would be nice to add a back reference to this method in http://matplotlib.org/api/ticker_api.html best, Pierre |
|
From: Gabriele B. <gb....@gm...> - 2014-02-17 18:15:57
|
Hi, I'm dealing with a guy that is colorblind. Have you got any suggestion on how could I show a plot like the one attached to him? Is there an option in pyplot that write little numbers near the curves instead of colors? thanks Gabriele |
|
From: Eric F. <ef...@ha...> - 2014-02-17 17:14:09
|
On 2014/02/17 4:58 AM, Pierre Haessig wrote: > Hi, > > In order to get a plot with a small number of ticks, it is possible to > create a matplotlib.ticker.MaxNLocator object with a small value for > `nbins`. > > However, I found it also possible to modify the existing AutoLocator > instances, since AutoLocator derives from MaxNLocator : > > ax.xaxis.major.locator.set_params(nbins=5) > ax.yaxis.major.locator.set_params(nbins=5) > > (the default nbins value seems to be 9) > > The advantage of this inplace solution is that it doesn't any > importing/browsing in the mpl namespace. However, it's still a bit long. > > I was then wondering : > 1) is this solution recommended or not ? > 2) is there a shortcup to avoird the five "dots" ? http://matplotlib.org/api/pyplot_api.html?highlight=locator_params#matplotlib.pyplot.locator_params This is both a pyplot function and an Axes method. Eric > > best, > Pierre |
|
From: Pierre H. <pie...@cr...> - 2014-02-17 14:58:50
|
Hi, In order to get a plot with a small number of ticks, it is possible to create a matplotlib.ticker.MaxNLocator object with a small value for `nbins`. However, I found it also possible to modify the existing AutoLocator instances, since AutoLocator derives from MaxNLocator : ax.xaxis.major.locator.set_params(nbins=5) ax.yaxis.major.locator.set_params(nbins=5) (the default nbins value seems to be 9) The advantage of this inplace solution is that it doesn't any importing/browsing in the mpl namespace. However, it's still a bit long. I was then wondering : 1) is this solution recommended or not ? 2) is there a shortcup to avoird the five "dots" ? best, Pierre |
|
From: Maggie M. <mar...@gm...> - 2014-02-17 04:05:53
|
Hi everyone, Sorry if this is a redundant request, but I haven't been able to find any reliable sources online. I'm trying to install matplotlib on my mac with osx 10.7.5. I get the following error: > unknowne4ce8f4d9c9c:matplotlib margaretmaes$ python setup.py > build============================================================================ > Edit setup.cfg to change the build options > BUILDING MATPLOTLIB > matplotlib: yes [1.4.x] > python: yes [2.7.1 (r271:86832, Jun 16 2011, 16:59:05) > [GCC > 4.2.1 (Based on Apple Inc. build 5658) (LLVM build > 2335.15.00)]] > platform: yes [darwin] > REQUIRED DEPENDENCIES AND EXTENSIONS > numpy: yes [version 1.5.1] > six: yes [six was not found.] > dateutil: yes [using dateutil version 1.5] > tornado: yes [tornado was not found. It is required for the > WebAgg backend. pip/easy_install may attempt to > install it after matplotlib.] > pyparsing: yes [pyparsing was not found. It is required for > mathtext support. pip/easy_install may attempt to > install it after matplotlib.] > pycxx: yes [Couldn't import. Using local copy.] > libagg: yes [pkg-config information for 'libagg' could not > be found. Using local copy.] > freetype: no [The C/C++ header for freetype2 (ft2build.h) > could not be found. You may need to install the > development package.] > png: yes [pkg-config information for 'libpng' could not > be found. Using unknown version.] > qhull: yes [pkg-config information for 'qhull' could not > be > found. Using local copy.] > OPTIONAL SUBPACKAGES > sample_data: yes [installing] > toolkits: yes [installing] > tests: yes [nose 0.11.1 or later is required to run the > matplotlib test suite. pip/easy_install may > attempt > to install it after matplotlib. / mock is required > to run the matplotlib test suite. pip/easy_install > may attempt to install it after matplotlib.] > OPTIONAL BACKEND EXTENSIONS > macosx: yes [installing, darwin] > qt4agg: no [PyQt4 not found] > gtk3agg: no [Requires pygobject to be installed.] > gtk3cairo: no [Requires cairocffi or pycairo to be > installed.] > gtkagg: no [Requires pygtk] > tkagg: no [The C/C++ header for Tk (tk.h) could not be > found. You may need to install the development > package.] > wxagg: no [requires wxPython] > gtk: no [Requires pygtk] > agg: yes [installing] > cairo: no [cairocffi or pycairo not found] > windowing: no [Microsoft Windows only] > OPTIONAL LATEX DEPENDENCIES > dvipng: no > ghostscript: no > latex: no > pdftops: no > > ============================================================================ > * The following required packages can not be built: > * freetype I've tried symbolic linking freetype-related files in /usr/local (as seen here: http://stackoverflow.com/questions/4092994/unable-to-install-matplotlib-on-mac-os-x). I've also confirmed that freetype-related files are in my PATH environment variable. Could anyone point me in the right direction for installing the package? Many thanks, Maggie |
|
From: Jason G. <jas...@cr...> - 2014-02-15 13:55:45
|
On 2/14/14 4:13 PM, Benjamin Root wrote: > I rolled a 20 today for necromancer, so I am going to do a thread > resurrection. Given recent improvements in matplotlib, we should > definitely make this web-enabled. That way, we can share our nerdiness > with our non-nerdy significant others. Here's one try, with the experimental CommFigure IPython comm-based matplotlib backend I tweaked a few months ago: http://sagecell.sagemath.org/?q=vcycko (it responds to mouse motion, so move your mouse around. Change the duration line at the top to change how fast the heart beats.) Thanks, Jason |
|
From: Apostolis G. <apo...@gm...> - 2014-02-15 12:53:38
|
Amazing...
Great work!
2014-02-15 0:13 GMT+02:00 Benjamin Root <ben...@ou...>:
> I rolled a 20 today for necromancer, so I am going to do a thread
> resurrection. Given recent improvements in matplotlib, we should
> definitely make this web-enabled. That way, we can share our nerdiness with
> our non-nerdy significant others.
>
> Happy Valentine's day!
> Ben
>
> On Mon, Feb 14, 2011 at 8:25 PM, Paul Ivanov <piv...@gm...> wrote:
>
>> jules hummon, on 2011-02-14 07:23, wrote:
>> > Feel free to 'save and run', pass along, or ignore.
>> > This was my valentine's day present today.
>>
>> Thank you for sharing! I took the liberty of livening it up for
>> my sweetheart.
>>
>> #---------------------------------------------------
>> # hohumheartbeat.py - a more lively hohumheart.py ;)
>>
>> import numpy as np
>> import matplotlib as mpl
>> import matplotlib.pyplot as plt
>> from matplotlib.patches import Polygon
>>
>> # force square figure and square axes looks better for polar, IMO
>> width, height = mpl.rcParams['figure.figsize']
>> size = min(width, height)
>> # make a square figure
>> fig = plt.figure(figsize=(size, size))
>> ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#ffffff')
>> ax2 = fig.add_axes([0.45, .9, 0.1, 0.1], polar=True, axisbg='#ffffff')
>>
>> ax.set_rmax(2.0)
>> ax2.set_rmax(4.0)
>> ax2.spines['polar'].set_visible(False)
>> ax2.patch.set_alpha(.3)
>> for a in ax,ax2:
>> a.set_xticks([])
>> a.set_yticks([])
>> ax.grid(False)
>>
>> theta = np.linspace(0,1,100)*np.pi*2
>> r = 1*(1-np.cos(theta))
>>
>> ncards = 5
>> step = 2*np.pi/ncards
>> pdict = dict(fc='r',ec='k', alpha=.5)
>> for ii in range(ncards):
>> tr = np.column_stack((theta+ii*step, r))
>> ax.add_patch(Polygon(tr, **pdict))
>>
>> # from WolframMath "Heart Curve"
>> r2 = 2 - 2*np.sin(theta)
>> r2 += np.sin(theta) * np.sqrt(np.abs(np.cos(theta))) / (np.sin(theta)+1.4)
>>
>> tr2 = np.column_stack((theta, r2))
>> ax2.add_patch(Polygon(tr2,**pdict)) # heart
>>
>> kwargs = dict(transform=ax2.transAxes, va='center', fontsize=20)
>> ax2.text(0,.45,"I",ha='right',**kwargs)
>> ax2.text(1,.4,"you",ha='left',**kwargs)
>>
>> beat = np.tan(np.linspace(0, np.pi*2, 100))
>> beat[0:20] = beat[60:80]
>> beat[-20:] = beat[20:40]
>> beat -= beat.min()
>> beat /= beat.max()
>>
>> i=0; beatlen = len(beat)-1;
>> def heartbeat(e):
>> global i;
>> i = (i+1) % (beatlen)
>> y = beat[i]
>> ax2.set_rmax(y*4. + 4.)
>> ax2.draw(ax.figure.canvas.get_renderer())
>> ax2.figure.canvas.blit(ax2.bbox)
>> #plt.draw() #use if the last two lines cause trouble
>>
>> # even your mouse movements make my heart skip a bit!
>> cid = ax.figure.canvas.mpl_connect('idle_event', heartbeat)
>>
>> print "ax.figure.canvas.mpl_disconnect(%d)" %cid
>> print "#run the line above to 'flatline' (stop heartbeat)"
>> plt.show()
>>
>> best,
>> --
>> Paul Ivanov
>> 314 address only used for lists, off-list direct email at:
>> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (GNU/Linux)
>>
>> iEYEARECAAYFAk1Z1gcACgkQe+cmRQ8+KPccQACgiCFswsMAqJObseb8yn2dHLR3
>> UuwAn0xb2MeaQJffHt70/u8T1j6lmuCJ
>> =0hq/
>> -----END PGP SIGNATURE-----
>>
>>
>> ------------------------------------------------------------------------------
>> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
>> Pinpoint memory and threading errors before they happen.
>> Find and fix more than 250 security defects in the development cycle.
>> Locate bottlenecks in serial and parallel code that limit performance.
>> http://p.sf.net/sfu/intel-dev2devfeb
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience. Start now.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Benjamin R. <ben...@ou...> - 2014-02-14 22:13:40
|
I rolled a 20 today for necromancer, so I am going to do a thread
resurrection. Given recent improvements in matplotlib, we should
definitely make this web-enabled. That way, we can share our nerdiness with
our non-nerdy significant others.
Happy Valentine's day!
Ben
On Mon, Feb 14, 2011 at 8:25 PM, Paul Ivanov <piv...@gm...> wrote:
> jules hummon, on 2011-02-14 07:23, wrote:
> > Feel free to 'save and run', pass along, or ignore.
> > This was my valentine's day present today.
>
> Thank you for sharing! I took the liberty of livening it up for
> my sweetheart.
>
> #---------------------------------------------------
> # hohumheartbeat.py - a more lively hohumheart.py ;)
>
> import numpy as np
> import matplotlib as mpl
> import matplotlib.pyplot as plt
> from matplotlib.patches import Polygon
>
> # force square figure and square axes looks better for polar, IMO
> width, height = mpl.rcParams['figure.figsize']
> size = min(width, height)
> # make a square figure
> fig = plt.figure(figsize=(size, size))
> ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#ffffff')
> ax2 = fig.add_axes([0.45, .9, 0.1, 0.1], polar=True, axisbg='#ffffff')
>
> ax.set_rmax(2.0)
> ax2.set_rmax(4.0)
> ax2.spines['polar'].set_visible(False)
> ax2.patch.set_alpha(.3)
> for a in ax,ax2:
> a.set_xticks([])
> a.set_yticks([])
> ax.grid(False)
>
> theta = np.linspace(0,1,100)*np.pi*2
> r = 1*(1-np.cos(theta))
>
> ncards = 5
> step = 2*np.pi/ncards
> pdict = dict(fc='r',ec='k', alpha=.5)
> for ii in range(ncards):
> tr = np.column_stack((theta+ii*step, r))
> ax.add_patch(Polygon(tr, **pdict))
>
> # from WolframMath "Heart Curve"
> r2 = 2 - 2*np.sin(theta)
> r2 += np.sin(theta) * np.sqrt(np.abs(np.cos(theta))) / (np.sin(theta)+1.4)
>
> tr2 = np.column_stack((theta, r2))
> ax2.add_patch(Polygon(tr2,**pdict)) # heart
>
> kwargs = dict(transform=ax2.transAxes, va='center', fontsize=20)
> ax2.text(0,.45,"I",ha='right',**kwargs)
> ax2.text(1,.4,"you",ha='left',**kwargs)
>
> beat = np.tan(np.linspace(0, np.pi*2, 100))
> beat[0:20] = beat[60:80]
> beat[-20:] = beat[20:40]
> beat -= beat.min()
> beat /= beat.max()
>
> i=0; beatlen = len(beat)-1;
> def heartbeat(e):
> global i;
> i = (i+1) % (beatlen)
> y = beat[i]
> ax2.set_rmax(y*4. + 4.)
> ax2.draw(ax.figure.canvas.get_renderer())
> ax2.figure.canvas.blit(ax2.bbox)
> #plt.draw() #use if the last two lines cause trouble
>
> # even your mouse movements make my heart skip a bit!
> cid = ax.figure.canvas.mpl_connect('idle_event', heartbeat)
>
> print "ax.figure.canvas.mpl_disconnect(%d)" %cid
> print "#run the line above to 'flatline' (stop heartbeat)"
> plt.show()
>
> best,
> --
> Paul Ivanov
> 314 address only used for lists, off-list direct email at:
> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk1Z1gcACgkQe+cmRQ8+KPccQACgiCFswsMAqJObseb8yn2dHLR3
> UuwAn0xb2MeaQJffHt70/u8T1j6lmuCJ
> =0hq/
> -----END PGP SIGNATURE-----
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: Paul H. <pmh...@gm...> - 2014-02-14 20:36:22
|
Hey Gabriele, See this example here: http://stackoverflow.com/questions/14762181/adding-a-y-axis-label-to-secondary-y-axis-in-matplotlib/14762601#14762601 On Fri, Feb 14, 2014 at 12:32 PM, Gabriele Brambilla < gb....@gm...> wrote: > Hi, > > I'm trying to plot two functions on the same errorbar picture like the > code below: > > fmlp = plt.figure() > > axop = fmlp.add_subplot(111) > > insp = axop.errorbar(g, Pampli, yerr = ePampli, fmt = '.') > ins1 = axop.errorbar(g, lightcurva, yerr = zeros, fmt = 'x') > > axop.set_title('amplitudes for phases') > > fmlp.canvas.draw() > > but the two functions has a very different range in y values (one near > 10^-15 one near 1): how could I use two different scale (one per function) > on the same plot? > > thanks > > > ------------------------------------------------------------------------------ > Android apps run on BlackBerry 10 > Introducing the new BlackBerry 10.2.1 Runtime for Android apps. > Now with support for Jelly Bean, Bluetooth, Mapview and more. > Get your Android app in front of a whole new audience. Start now. > > http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Gabriele B. <gb....@gm...> - 2014-02-14 20:32:21
|
Hi,
I'm trying to plot two functions on the same errorbar picture like the code
below:
fmlp = plt.figure()
axop = fmlp.add_subplot(111)
insp = axop.errorbar(g, Pampli, yerr = ePampli, fmt = '.')
ins1 = axop.errorbar(g, lightcurva, yerr = zeros, fmt = 'x')
axop.set_title('amplitudes for phases')
fmlp.canvas.draw()
but the two functions has a very different range in y values (one near
10^-15 one near 1): how could I use two different scale (one per function)
on the same plot?
thanks
|
|
From: Andreas H. <li...@hi...> - 2014-02-14 16:44:21
|
>> Is there a way to have subplots_adjust() automatically chose left, >> right, bottom, top values so that everything that's been drawn tightly >> fits the figure? > What about plt.tight_layout() ? > (or fig.tight_layout ) Yes, thanks, Pierre! Andreas. |
|
From: Benjamin Trendelkamp-S. <tre...@ze...> - 2014-02-14 10:04:37
|
Hi, I think there is an import warnings statement missing in the setupext.py file in the matplotlib-1.3.1 source package. Adding the missing import made the installation from source work for me. Maybe someone can doublecheck that. Best, Benjamin -- Benjamin Trendelkamp-Schroer Freie Universität Berlin FB Mathematik + Informatik Institut für Mathematik Arnimallee 6 D-14195 Berlin-Dahlem tre...@ze... +49-(0)30-838-75364 |
|
From: Gaute H. <eg...@ga...> - 2014-02-14 09:20:29
|
Greetings list, I am trying to figure out the differences between mlab.specgram and MATLABs spectrogram functions. I am mostly interested in MATLABs [.., P] output which is the PSD for each segment. It seems to me that the output of mlab.specgram's (Pxx, ..) is in fact the equivialent of MATLABSs [.., P] and not [S, ...], is this correct? Thanks, Gaute |
|
From: Pierre H. <pie...@cr...> - 2014-02-14 07:46:07
|
Hi Andreas, Le 14/02/2014 08:12, Andreas Hilboll a écrit : > Is there a way to have subplots_adjust() automatically chose left, > right, bottom, top values so that everything that's been drawn tightly > fits the figure? What about plt.tight_layout() ? (or fig.tight_layout ) best, Pierre |
|
From: Andreas H. <li...@hi...> - 2014-02-14 07:37:09
|
I need some help in saving effort to make a figure fill its canvas: Is there a way to have subplots_adjust() automatically chose left, right, bottom, top values so that everything that's been drawn tightly fits the figure? Basically I'm looking for something similar to bbox_inclues='tight' in savefig, except that I want the figure dimensions to stay the same and have the contents of the figure adjust to the figsize so that no space is wasted. Obviously, the hspace and wspace in subplots_adjust would still have to be choseable by the user. Any ideas? -- Andreas. |
|
From: Paul H. <pmh...@gm...> - 2014-02-13 14:56:05
|
It's not the wrong place, per se. But I think if you created an issue on the github repository, it's less likely to get lost in the ether. https://github.com/matplotlib/basemap On Wed, Feb 12, 2014 at 7:17 PM, Roman Olson <rom...@un...>wrote: > Hi All, > > I am new to this list so I apologize if this is supposed to be posted > somewhere else. > > Just wanted to report that there is missing documentation in > mpl_toolkits.basemap Basemap for a couple of keyword arguments, namely > o_lon_p and o_lat_p. > > (If this is the wrong place to post this please let me know an email to > report problems or bugs). > > Cheers, > -Roman > > Roman Olson > Postdoctoral Research Associate > Climate Change Research Centre > University of New South Wales > > > ------------------------------------------------------------------------------ > Android apps run on BlackBerry 10 > Introducing the new BlackBerry 10.2.1 Runtime for Android apps. > Now with support for Jelly Bean, Bluetooth, Mapview and more. > Get your Android app in front of a whole new audience. Start now. > > http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Roman O. <rom...@un...> - 2014-02-13 03:30:47
|
Hi All, I am new to this list so I apologize if this is supposed to be posted somewhere else. Just wanted to report that there is missing documentation in mpl_toolkits.basemap Basemap for a couple of keyword arguments, namely o_lon_p and o_lat_p. (If this is the wrong place to post this please let me know an email to report problems or bugs). Cheers, -Roman Roman Olson Postdoctoral Research Associate Climate Change Research Centre University of New South Wales |
|
From: Nicolas F. <nic...@gm...> - 2014-02-10 00:52:41
|
Hi Gary
To get more control on which grid shows / doesn't, you can do:
ax1.grid('on')
ax2.grid('off')
instead of:
plt.grid()
Nico
On 9/02/2014, at 5:34 pm, mat...@li... wrote:
> Message: 1
> Date: Sat, 8 Feb 2014 17:29:16 -0800
> From: "garyr" <ga...@fi...>
> Subject: [Matplotlib-users] twinx and grid
> To: <mat...@li...>
> Message-ID: <4ADC6E5C7E0B41E48913F2C42408B5E6@owner59bf8d40c>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> The script below labels both the left and right x-axes and shows a grid. Is
> there a way to force the horizontal grid lines to line up with the tic marks on
> the left axis (ax1)?
>
> import numpy as np
> import matplotlib.pyplot as plt
> fig = plt.figure()
> ax1 = fig.add_subplot(111)
> t = np.arange(0.01, 10.0, 0.01)
> s1 = np.exp(t)
> ax1.plot(t, s1, 'b-')
> ax2 = ax1.twinx()
> s2 = np.sin(2*np.pi*t)
> ax2.plot(t, s2, 'r')
> plt.grid()
> plt.show()
>
>
--
Dr. Nicolas Fauchereau
Climate Scientist – National Climate Centre
National Institute of Water and Atmospheric Research (NIWA) Ltd.
41 Market Place
Viaduct Precinct, Auckland
NEW ZEALAND
Tel: +64 (0)9 375 2053
|
|
From: Sivaram N. <nsi...@gm...> - 2014-02-09 13:54:42
|
I'd appreciate some pointers on how to get a barchart of the following --8<---------------cut here---------------start------------->8--- date|name|empid|app|subapp|hours 20140101|A|0001|IIC|I1|2.5 20140101|A|0001|IIC|I2|3 20140101|A|0001|IIC|I3|4 20140101|A|0001|CAR|C1|2.5 20140101|A|0001|CAR|C2|3 20140101|A|0001|CAR|C3|2 20140101|A|0001|CAR|C4|2 --8<---------------cut here---------------end--------------->8--- I've got the above in a panda dataframe df and I'd like to plot them as blue: 3 bars of IIC (I1-I3) of the hours, bar labelled with subapp and hours on top of the bar red: 4 bars of CAR (C1-C5) of the hours, bar labelled with subapp and hours on top of the bar on the y axis with the date on the x axis. sivaram -- |
|
From: Matt S. <ma...@pl...> - 2014-02-09 12:57:06
|
Hey matplotlib users, Hi, I'm with Plotly <http://plot.ly>. We thought we'd let you know you can convert matplotlib code to Plotly graphs and our Python API <http://plot.ly>to make interactive, online graphs in Plotly. Your graphs are styled with D3, in the browser, and store your data too. Once you make a graph with the API, you can edit it with a GUI, share it, and embed it. Here is an example translation<http://nbviewer.ipython.org/gist/arsenovic/8375182>, in an IPython Notebook. This feature is something still quite early and that we're exploring (GitHub thread <https://github.com/plotly/python-api/issues/3>). So we'd very much appreciate your advice and suggestions. As a new team, getting suggestions from folks with insider knowledge goes a long way. All my best, Matt |
|
From: Goyo <goy...@gm...> - 2014-02-09 11:59:15
|
2014-02-09 2:29 GMT+01:00 garyr <ga...@fi...>: > The script below labels both the left and right x-axes and shows a grid. Is > there a way to force the horizontal grid lines to line up with the tic marks on > the left axis (ax1)? > > import numpy as np > import matplotlib.pyplot as plt > fig = plt.figure() > ax1 = fig.add_subplot(111) > t = np.arange(0.01, 10.0, 0.01) > s1 = np.exp(t) > ax1.plot(t, s1, 'b-') > ax2 = ax1.twinx() > s2 = np.sin(2*np.pi*t) > ax2.plot(t, s2, 'r') > plt.grid() > plt.show() plt.grid() affects the current axes so calling it before creating the second one should do. I think it would be more consistent if you used the method ax1.grid() though. Goyo |
|
From: Joe K. <jof...@gm...> - 2014-02-09 04:34:55
|
Hi Yi,
I also posted this as an answer to your question on SO, but here's how I'd
approach it.
It's simplest to just have a "DraggablePoints" class that accepts multiple
artists. That way you can synchronize which artist is "active" and ignore
the others.
As an example, based on yours:
import matplotlib.pyplot as plt
import matplotlib.patches as patches
class DraggablePoints(object):
def __init__(self, artists, tolerance=5):
for artist in artists:
artist.set_picker(tolerance)
self.artists = artists
self.currently_dragging = False
self.current_artist = None
self.offset = (0, 0)
for canvas in set(artist.figure.canvas for artist in self.artists):
canvas.mpl_connect('button_press_event', self.on_press)
canvas.mpl_connect('button_release_event', self.on_release)
canvas.mpl_connect('pick_event', self.on_pick)
canvas.mpl_connect('motion_notify_event', self.on_motion)
def on_press(self, event):
self.currently_dragging = True
def on_release(self, event):
self.currently_dragging = False
self.current_artist = None
def on_pick(self, event):
if self.current_artist is None:
self.current_artist = event.artist
x0, y0 = event.artist.center
x1, y1 = event.mouseevent.xdata, event.mouseevent.ydata
self.offset = (x0 - x1), (y0 - y1)
def on_motion(self, event):
if not self.currently_dragging:
return
if self.current_artist is None:
return
dx, dy = self.offset
self.current_artist.center = event.xdata + dx, event.ydata + dy
self.current_artist.figure.canvas.draw()
if __name__ == '__main__':
fig, ax = plt.subplots()
ax.set(xlim=[-1, 2], ylim=[-1, 2])
circles = [patches.Circle((0.32, 0.3), 0.2, fc='r', alpha=0.5),
patches.Circle((0.3, 0.3), 0.2, fc='b', alpha=0.5)]
for circ in circles:
ax.add_patch(circ)
dr = DraggablePoints(circles)
plt.show()
Hope that helps!
-Joe
On Sat, Feb 8, 2014 at 7:32 PM, Yi <ide...@gm...> wrote:
> Hi Matplotlib community:
>
> In my case, I only want to drag one point each time. However, since the
> two points are heavily overlapping, dragging one point would cause another
> point to be dragged. How can I only drag one of the point? Thank you!
>
>
> from pylab import *from scipy import *import matplotlib.pyplot as pltimport matplotlib.patches as patches
>
> class DraggablePoint:
> def __init__(self, p):
> self.point = p
> self.press = None
>
> def connect(self):
> self.cidpress = self.point.figure.canvas.mpl_connect('button_press_event', self.button_press_event)
> self.cidrelease = self.point.figure.canvas.mpl_connect('button_release_event', self.button_release_event)
> self.cidmotion = self.point.figure.canvas.mpl_connect('motion_notify_event', self.motion_notify_event)
>
> def disconnect(self):
> 'disconnect all the stored connection ids'
> self.point.figure.canvas.mpl_disconnect(self.cidpress)
> self.point.figure.canvas.mpl_disconnect(self.cidrelease)
> self.point.figure.canvas.mpl_disconnect(self.cidmotion)
>
>
> def button_press_event(self,event):
> if event.inaxes != self.point.axes:
> return
> contains = self.point.contains(event)[0]
> if not contains: return
> self.press = self.point.center, event.xdata, event.ydata
>
>
> def button_release_event(self,event):
> self.press = None
> self.point.figure.canvas.draw()
>
> def motion_notify_event(self, event):
> if self.press is None: return
> if event.inaxes != self.point.axes: return
> self.point.center, xpress, ypress = self.press
> dx = event.xdata - xpress
> dy = event.ydata - ypress
> self.point.center = (self.point.center[0]+dx, self.point.center[1]+dy)
> print self.point.center
> self.point.figure.canvas.draw()
> if __name__ == '__main__':
> fig = plt.figure()
> ax = fig.add_subplot(111)
> ax.set_xlim(-1,2)
> ax.set_ylim(-1,2)
> circles = []
> circle1 = patches.Circle((0.32,0.3), 0.2, fc='r', alpha=0.5, picker=True)
> circle = patches.Circle((0.3,0.3), 0.2, fc='b', alpha=0.5, picker=True)
> circles.append(ax.add_patch(circle1))
> circles.append(ax.add_patch(circle))
> drs = []
> for c in circles:
> #print c.center[0]
> dr = DraggablePoint(c)
> dr.connect()
> drs.append(dr)
> plt.show()
>
>
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: garyr <ga...@fi...> - 2014-02-09 01:51:50
|
The script below labels both the left and right x-axes and shows a grid. Is there a way to force the horizontal grid lines to line up with the tic marks on the left axis (ax1)? import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax1 = fig.add_subplot(111) t = np.arange(0.01, 10.0, 0.01) s1 = np.exp(t) ax1.plot(t, s1, 'b-') ax2 = ax1.twinx() s2 = np.sin(2*np.pi*t) ax2.plot(t, s2, 'r') plt.grid() plt.show() |