Popular recipes tagged "plotting"http://code.activestate.com/recipes/tags/plotting/2013-01-05T15:59:24-08:00ActiveState Code RecipesAn alternative way to draw parallels and meridians with basemap (Python) 2013-01-05T15:59:24-08:00PGhttp://code.activestate.com/recipes/users/4184598/http://code.activestate.com/recipes/578399-an-alternative-way-to-draw-parallels-and-meridians/ <p style="color: grey"> Python recipe 578399 by <a href="/recipes/users/4184598/">PG</a> (<a href="/recipes/tags/layout/">layout</a>, <a href="/recipes/tags/map/">map</a>, <a href="/recipes/tags/plots/">plots</a>, <a href="/recipes/tags/plotting/">plotting</a>). Revision 2. </p> <p>Basemap is a toolkit of matplotlib used to plot geographic maps.</p> <p>With this function you can:</p> <ul> <li><p>Draw the latitude/longitude grid easily in one line of code, specifying the lat/lon intervals.</p></li> <li><p>Use rcParams, so all your figures will look more consistent.</p></li> <li><p>Specify the label pad <em>in points</em> (instead of projection units).</p></li> <li><p>Place the labels indicating which margins will be used.</p></li> </ul> Plotting maps with Polar Stereographic projection focused in a region with Basemap (Python) 2012-12-15T11:49:52-08:00PGhttp://code.activestate.com/recipes/users/4184598/http://code.activestate.com/recipes/578379-plotting-maps-with-polar-stereographic-projection-/ <p style="color: grey"> Python recipe 578379 by <a href="/recipes/users/4184598/">PG</a> (<a href="/recipes/tags/map/">map</a>, <a href="/recipes/tags/matplotlib/">matplotlib</a>, <a href="/recipes/tags/plotting/">plotting</a>, <a href="/recipes/tags/projections/">projections</a>, <a href="/recipes/tags/stereographic/">stereographic</a>). Revision 3. </p> <p>When plotting maps with either 'npstere' or 'spstere' projections with the Basemap toolkit for Matplotlib, the pole will always be placed in the center of the figure. With this function you can zoom the map to the area of interest by giving the latitude/longitudes coordinates of the bounds.</p> Mandelbrot trajectories (Python) 2011-04-06T18:18:48-07:00Kaushik Ghosehttp://code.activestate.com/recipes/users/4166965/http://code.activestate.com/recipes/577642-mandelbrot-trajectories/ <p style="color: grey"> Python recipe 577642 by <a href="/recipes/users/4166965/">Kaushik Ghose</a> (<a href="/recipes/tags/graph/">graph</a>, <a href="/recipes/tags/interactive/">interactive</a>, <a href="/recipes/tags/matplotlib/">matplotlib</a>, <a href="/recipes/tags/plotting/">plotting</a>, <a href="/recipes/tags/widget/">widget</a>). </p> <p>An interactive graph to plot the trajectory of points on and off the mandelbrot set. Illustrates the use of sliders in matplotlib</p> Benford's Law demo (Python) 2010-10-19T10:56:51-07:00Glenn Hutchingshttp://code.activestate.com/recipes/users/4175415/http://code.activestate.com/recipes/577431-benfords-law-demo/ <p style="color: grey"> Python recipe 577431 by <a href="/recipes/users/4175415/">Glenn Hutchings</a> (<a href="/recipes/tags/benford/">benford</a>, <a href="/recipes/tags/matplotlib/">matplotlib</a>, <a href="/recipes/tags/plotting/">plotting</a>). </p> <p>Here's a simple program to demonstrate <a href="http://en.wikipedia.org/wiki/Benford%27s_law">Benford's Law</a>, which also shows the simple power of <a href="http://matplotlib.sourceforge.net">matplotlib</a>. It reads from a bunch of files (or stdin, if none specified), extracts the leading digits of all number-like strings found, and plots the distribution in a window together with the expected result if Benford's law applies.</p>