Re: [Matplotlib-users] I cannot change the axis tick separation or nbins in Axis artist

2013-02-21 Thread Paul Hobson
On Thu, Feb 21, 2013 at 1:08 AM, patricia ptramba...@hotmail.com wrote: Dear Jody, This is the original code that I am using: http://old.nabble.com/Taylor-diagram-(2nd-take)-p33364690.html It is a code that plots Taylor diagrams. I would like to get ticks every two points in the standard

Re: [Matplotlib-users] cross correlation

2013-02-07 Thread Paul Hobson
On Thu, Feb 7, 2013 at 3:24 AM, Sudheer Joseph sudheer.jos...@yahoo.comwrote: Dear Users, I am relatively new to Matplotlib. I wanted to find cross correlation between 2 time series for my research and was looking at options available with python and found

Re: [Matplotlib-users] Plot trajectories on an map using matplotlib-basemap

2013-01-29 Thread Paul Hobson
On Mon, Jan 28, 2013 at 9:41 PM, Boris Vladimir Comi gle...@comunidad.unam.mx wrote: #! /usr/bin/python import numpy as np data = np.loadtxt('path-tracks.csv',dtype=np.str,delimiter=',',skiprows=1) print data [['19.70' '-95.20' '2/5/04 6:45 AM' '1' '-38' 'CCM'] ['19.70'

Re: [Matplotlib-users] Problems installing matplotlib - compiling error

2013-01-28 Thread Paul Hobson
On Mon, Jan 28, 2013 at 10:20 AM, Orgun ambr...@gmail.com wrote: Hi guy, as I'm new to matplotlib I tried to install it following the instructions on http://matplotlib.org/faq/installing_faq.html#source-install-from-git http://matplotlib.org/faq/installing_faq.html#source-install-from-git

Re: [Matplotlib-users] cannot directly reply to the mail?

2013-01-24 Thread Paul Hobson
On Thu, Jan 24, 2013 at 9:35 AM, Chao YUE chaoyue...@gmail.com wrote: Dear all, why I can only recieve the Matplotlib-users Digest, but not the email. Each time I need to go http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html to reply the the mail. I think I must miss

Re: [Matplotlib-users] getting the dimensions of an axes

2013-01-23 Thread Paul Hobson
On Mon, Jan 21, 2013 at 4:28 AM, Kelson Zawack k...@cornell.edu wrote: a heat map and want to label each row. I thus need the font size of the text to scale with the number of rows in the heat map. Is Assuming you start out with this: import matplotlib.pyplot as plt fig, ax1 =

Re: [Matplotlib-users] twiny and title

2013-01-22 Thread Paul Hobson
On Tue, Jan 22, 2013 at 12:22 PM, Jonathan Slavin jsla...@cfa.harvard.eduwrote: Hi, I'm having some trouble with using twiny and a title on the plot. The title is writing over the axis label -- and even the tick labels. I've tried tight_layout() but it doesn't seem to help. I could use

Re: [Matplotlib-users] Matplotlib lag on windows seven

2013-01-18 Thread Paul Hobson
On Thu, Jan 17, 2013 at 8:10 AM, Fabien Lafont lafont.fab...@gmail.comwrote: Thanks! I have:Qt4Agg 2013/1/17 Benjamin Root ben.r...@ou.edu On Thu, Jan 17, 2013 at 8:43 AM, Fabien Lafont lafont.fab...@gmail.comwrote: What is a backend??? The version number? I'm using Matplotlib

Re: [Matplotlib-users] Text positioning anchored to its bounding box

2013-01-16 Thread Paul Hobson
On Wed, Jan 16, 2013 at 7:07 AM, Daniele Nicolodi dani...@grinta.netwrote: Hello, I use matplotlib.pyplot.text() to annotate my plots. When annotating reference lines on simple x,y plots I find it quite annoying to have to manually compute an offset in data coordinates to have some spacing

Re: [Matplotlib-users] How to start when you don't know what to do

2013-01-15 Thread Paul Hobson
On Jan 15, 2013, at 20:52 , Steven Boada wrote: Heyya list. I must admit that my matplotlib-foo is only so so. One of the biggest problems that I face is seeing cool stuff around the net, and thinking, that's pretty neat, I'd like to copy it. In reality, I have no idea how I would go

Re: [Matplotlib-users] Clipped colorbar values in matshow

2013-01-14 Thread Paul Hobson
On Mon, Jan 14, 2013 at 8:50 AM, Alejandro Weinstein alejandro.weinst...@gmail.com wrote: On Mon, Jan 14, 2013 at 9:42 AM, Paul Hobson pmhob...@gmail.com wrote: import matplotlib.pyplot as plt import numpy as np A = np.random.rand(100,10) / 100 fig, ax = plt.subplots() img

Re: [Matplotlib-users] mathtext and fonts under Windows 8

2013-01-09 Thread Paul Hobson
Sounds like it might have something to do with your Latex installation (if any) or the barebones Latex-rendering done by MPL alone. Namely, they simply don't have the characters for mathematical Arial available. Not too sure though. Hopefully someone more knowledgeable responds. -paul On Tue,

Re: [Matplotlib-users] legend on a plot with broken_barh()

2013-01-04 Thread Paul Hobson
On Fri, Jan 4, 2013 at 8:41 AM, gsal salger...@gmail.com wrote: So, it looks like broken_barh's do not show up on the legend...is there work around for this? Or, Is there a way to fake a legend? A way to set legend to whatever I want? Thanks, gsal To fake a legend, try using

Re: [Matplotlib-users] legend on a plot with broken_barh()

2013-01-04 Thread Paul Hobson
[Forgot to reply-all, sorry for the dup, gsal] On Fri, Jan 4, 2013 at 1:22 PM, gsal salger...@gmail.com wrote: can you provide an example? The reference help is only two lines! Given: [code] import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111)

Re: [Matplotlib-users] open circles aren't showing up in the legend box

2013-01-03 Thread Paul Hobson
On Wed, Jan 2, 2013 at 4:46 PM, Joe Louderback jglouderb...@gmail.comwrote: import matplotlib.pyplot as plt fig = plt.figure() plot = fig.add_subplot(111) plot.scatter([1, 2, 3], [4, 5, 6], c = [0.2, 0.4, 0.6], label = 'one', cmap = 'jet', marker = 'o', edgecolor = 'face')

Re: [Matplotlib-users] rectangle 3D with transparency

2012-12-26 Thread Paul Hobson
On Wed, Dec 26, 2012 at 6:49 AM, Diego Avesani diego.aves...@gmail.comwrote: Dear all, I need to plot a 2D rectangle in a 3D plot. I already know how to put a circle. I have started from: http://matplotlib.org/examples/mplot3d/pathpatch3d_demo.html and inserting the alpha parameter. *p =

Re: [Matplotlib-users] How to provide colorbars for scatterplots created this way?

2012-12-20 Thread Paul Hobson
On Thu, Dec 20, 2012 at 1:05 PM, Kynn Jones kyn...@gmail.com wrote: I create PNG files of scatterplots with code that, in essence, goes as in the sketch below: cmap = (matplotlib.color.LinearSegmentedColormap. from_list('blueWhiteRed', ['blue', 'white', 'red'])) fig =

Re: [Matplotlib-users] semilog minor grid problem

2012-12-12 Thread Paul Hobson
On Wed, Dec 12, 2012 at 7:55 AM, Forrester, Kurt kurt.forrester@gmail.com wrote: ax.set_xlim(0.5, 2) ax.set_xscale('log', basex=2, subsx=range(2,9)) Kurt, That `subsx` kwarg is tricky. Does this example get you closer to what you want? import numpy as np import matplotlib.pyplot as

Re: [Matplotlib-users] ipython --pylab: Figure not showing in simple plot(1, 1) command [v1.2]

2012-12-10 Thread Paul Hobson
On Mon, Dec 10, 2012 at 12:15 PM, Timothy Duly timdu...@gmail.com wrote: Hi, I recently upgraded to matplotlib v1.2.0 on my Linux machine. For some reason, plots are not appearing at all on my screen whenever I try to plot any routines. When I open the interpreter with ipython --pylab and

Re: [Matplotlib-users] Plot multiple lines

2012-11-15 Thread Paul Hobson
On Thu, Nov 15, 2012 at 2:48 PM, Boris Vladimir Comi gle...@comunidad.unam.mx wrote: Hi all: I have begun to learn about python / matplolib / basemap and really need some help. My data is in an Excel workbook in format .xls or csv(see attached): 1. How to open excel file in python? 2.

Re: [Matplotlib-users] how to reverse the colorbar and its label at the same time?

2012-11-10 Thread Paul Hobson
On Sat, Nov 10, 2012 at 7:07 AM, Chao YUE chaoyue...@gmail.com wrote: Dear all, Is there a way to reverse the colorbar label, the default is small value at the bottom and big value at the top, yet I would like the big value at the bottom and small value at the top. all code in pylab

Re: [Matplotlib-users] how to put colorbar label beside the handle?

2012-11-10 Thread Paul Hobson
On Sat, Nov 10, 2012 at 6:25 AM, Chao YUE chaoyue...@gmail.com wrote: Dear all, In the colorbar label for contourf or imshow plot, I want the effect like that in the attached figure. Is there some way to move the position of colorbar label? could someone give any hints? Chao, It's not

Re: [Matplotlib-users] Eclipse with PyDev on Ubuntu - updating matplotlib version in eclipse ide

2012-10-05 Thread Paul Hobson
On Wed, Oct 3, 2012 at 6:25 AM, Harshad Surdi harshadsu...@gmail.com wrote: Hi, I am using Eclipse IDE for Java Developers with PyDev on Ubuntu 12.04 and I am quite new to Ubuntu and Eclipse. Can you guide me as to hos to update matplotlib in PyDev in Eclipse? -- Best Regards, Harshad

Re: [Matplotlib-users] example of pareto chart

2012-09-25 Thread Paul Hobson
On Mon, Sep 24, 2012 at 12:21 AM, Paul Tremblay paulhtremb...@gmail.com wrote: Here is my example of a Pareto chart. For an explanation of a Pareto chart: http://en.wikipedia.org/wiki/Pareto_chart Could I get this chart added to the matplolib gallery? Thanks Paul On 9/24/12 4:40

Re: [Matplotlib-users] boxplot -- how (more)

2012-08-21 Thread Paul Hobson
On Tue, Aug 21, 2012 at 7:58 AM, Virgil Stokes v...@it.uu.se wrote: In reference to my previous email. How can I find the outliers (samples points beyond the whiskers) in the data used for the boxplot? Here is a code snippet that shows how it was used for the timings data (a list of 4

Re: [Matplotlib-users] boxplot -- how (more)

2012-08-21 Thread Paul Hobson
On Tue, Aug 21, 2012 at 8:56 AM, Virgil Stokes v...@it.uu.se wrote: On 21-Aug-2012 17:50, Paul Hobson wrote: On Tue, Aug 21, 2012 at 7:58 AM, Virgil Stokes v...@it.uu.se wrote: In reference to my previous email. How can I find the outliers (samples points beyond the whiskers) in the data

Re: [Matplotlib-users] installing matplotlib on mac os X with the *.dmg file

2012-08-17 Thread Paul Hobson
On Fri, Aug 17, 2012 at 2:30 PM, Timothy Duly timdu...@gmail.com wrote: Hi, I'm having trouble installing matplotlib on mac os x. I downloaded the dmg file (matplotlib-1.1.1-py2.7-python.org-macosx10.6.dmg) from http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.1/ .

Re: [Matplotlib-users] Plot line/Line2D with edgecolor

2012-06-27 Thread Paul Hobson
On Wed, Jun 27, 2012 at 5:02 PM, Daniel Platz mail.to.daniel.pl...@googlemail.com wrote: Hello, I would like to plot a simple line using plt.plot(x, y, ‘w--’, lw=2) or with the corresponding axes instance ax.plot(x, y, ‘w--’, lw=2). However, I want the line to have a thin black edge like the

Re: [Matplotlib-users] trouble with Wt argument of matplotlib.mlab.PCA

2012-06-12 Thread Paul Hobson
On Mon, Jun 11, 2012 at 11:03 PM, Justin R justinbr...@gmail.com wrote: operating system Windows 7 matplotlib version : 1.1.0 obtained from sourceforge the class seems to generate the same Wt matrix for every input. The every element of the weight matrix is either +sqrt(1/2) or -sqrt(1/2).

Re: [Matplotlib-users] howto get minor ticks?

2012-05-15 Thread Paul Hobson
Neal, I can't run your script as is, but something as simple as this show work: import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.set_xscale('log') ax.xaxis.grid(True, which='major') ax.xaxis.grid(True, which='minor') plt.show() On Tue, May 15, 2012 at 10:18 AM,

Re: [Matplotlib-users] xticks label disappear for the first subplot AND shift the xticks label to the left

2012-04-20 Thread Paul Hobson
Pietro, Try the following: -set minor ticks at half intervals between your major ticks -labeling those as you currently label the major ticks -remove the minor tick markers (set markersize=0?) -clear out the major tick labels -paul On Fri, Apr 20, 2012 at 12:49 AM, Pietro peter.z...@gmail.com

Re: [Matplotlib-users] Bug in legend?

2012-04-16 Thread Paul Hobson
On Mon, Apr 16, 2012 at 4:58 AM, Yannick Copin yannick.co...@laposte.net wrote: Hi List, I think I found a bug in legend of a fill command (see attached code and figure) when the facecolor is 'none' but the alpha is not None (I'm using latest matplotlib 1.1.0). If confirmed, should I fill in

Re: [Matplotlib-users] How do I set grid spacing?

2012-04-10 Thread Paul Hobson
Ben Does ax.set_xlim([0,50]) do what you want it to do? -paul On Tue, Apr 3, 2012 at 5:57 PM, Ben Harrison ben.harri...@liquidmesh.com wrote: I create my figure in my (non-interactive) script like so: import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.plot(...)

Re: [Matplotlib-users] Matplotlib installation

2012-03-31 Thread Paul Hobson
How did you install Python 2.7? None of my windows machines have ever hand any problem finding it when I installed from the official binaries found at python.org. -paul On Fri, Mar 30, 2012 at 9:56 AM, Mateusz J Burgunder mburgun...@wesleyan.edu wrote: Hello, I am trying to download matplot

Re: [Matplotlib-users] Formatting the ticks in a plot

2012-03-29 Thread Paul Hobson
Brad, Matplotlib axes objects have set_xticklabels methods. It's brute force, but this will work: ax = gca() ax.set_xticks([0., 0.015, 0.03]) ax.set_xticklabels(['0', '0.015', '0.03']) Hope that helps, -paul On Thu, Mar 29, 2012 at 1:13 PM, Brad Malone brad.mal...@gmail.com wrote: Hello, I

Re: [Matplotlib-users] Not understable behavior

2012-03-20 Thread Paul Hobson
On Tue, Mar 20, 2012 at 5:27 AM, kususe kus...@interfree.it wrote: If I set the parameter transparent in the savefig function, more line are plotted out on the same figure, when I use the subplot function too. If I don't set it, all works well. Suggestions? I don't follow what you're saying

Re: [Matplotlib-users] How to remove x axis in a subplotted graph

2012-03-19 Thread Paul Hobson
Try it like this: fig, axes = plt.subplots(3,1,1) ax1, ax2, ax3 = axes p1, = ax1.plot(self.data0,self.data1) p2, = ax2.plot(self.data0,self.data2) p3, = ax3.plot(self.data0,self.data4) for ax in axes:

Re: [Matplotlib-users] How to remove x axis in a subplotted graph

2012-03-19 Thread Paul Hobson
Sorry...That first line should be: fig, axes = plt.subplots(ncols=3) # note: subplotS not subplot On Mon, Mar 19, 2012 at 5:45 PM, Paul Hobson pmhob...@gmail.com wrote: Try it like this:               fig, axes = plt.subplots(3,1,1)               ax1, ax2, ax3 = axes               p1, = ax1

Re: [Matplotlib-users] histogram and a line

2012-03-08 Thread Paul Hobson
Jerzy et al, Check out the axvline method (of pyplot or an axes object). You'll only have to specify the x-value, and it'll won't rescale your y-axis. -paul On Thu, Mar 8, 2012 at 4:50 AM, Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote: Nicolas Rougier, (to Mic, who can't see a

Re: [Matplotlib-users] open ascii grid data and plot

2012-03-08 Thread Paul Hobson
In my GIS experience, rasters don't have prj files. That's something that seems to be pretty specific to ESRI shapefiles. Point is, I don't think that's going to help you. All of the basemap examples use netcdf files. I think your path of least resistance right now is to figure out how to convert

Re: [Matplotlib-users] impossible to deactivate minor grid in logscale

2012-03-01 Thread Paul Hobson
Federico, You were so close! Try this: fig = plt.figure() ax = fig.add_subplot(111) ax.plot(range(100), range(100)) #If comment the following line everything is fine ax.set_xscale('log') xaxis = ax.get_xaxis() xaxis.grid(False, which='minor') xaxis.grid(False, which='major') plt.show() Hope

Re: [Matplotlib-users] draw lines in basemap

2012-03-01 Thread Paul Hobson
David, The loop is you have is unnecessary. You can plot the markers and the lines at the same time like so: from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt import matplotlib.lines as lines import numpy as np m =

Re: [Matplotlib-users] draw lines in basemap

2012-03-01 Thread Paul Hobson
, y = m(lons, lats) # forgot this line m.plot(x, y, 'D-', markersize=10, linewidth=2, color='k', markerfacecolor='b') m.drawcoastlines() plt.show() On Thu, Mar 1, 2012 at 6:43 PM, Paul Hobson pmhob...@gmail.com wrote: David, The loop is you have is unnecessary. You can plot the markers

Re: [Matplotlib-users] (no subject)

2012-01-28 Thread Paul Hobson
There is undoubtedly a more efficient way to do this, but give this a shot: import numpy as np import matplotlib.pyplot as plt x = np.arange(0, 10.5, 0.5) y = -3.0*x + 0.5*x**2 color_list = ['FireBrick', 'Orange', 'DarkGreen', 'DarkBlue', 'Indigo'] limits = np.arange(0, 11, 2) fig, ax1 =

Re: [Matplotlib-users] set yticklabels fonts size without setting the yticklabels

2012-01-25 Thread Paul Hobson
I always taylor a matplotlibrc file for a given project, but you can modify the rc parameters on the fly: http://matplotlib.sourceforge.net/users/customizing.html#dynamic-rc-settings You need to set themodified rc parameters at the top of your script. Hope that helps. -paul On Wed, Jan 25,

Re: [Matplotlib-users] pie colors

2011-12-12 Thread Paul Hobson
On Wed, Nov 30, 2011 at 7:43 PM, Benjamin Root ben.r...@ou.edu wrote: As an additional note, would it be a desirable feature to be able to cycle hash styles in the case of producing bw plots? Ben Root Ben, I think this would be quite useful. How are you thinking of implementing it? Cycling

Re: [Matplotlib-users] Gradient color on a line plot

2011-11-07 Thread Paul Hobson
Gökhan, This a great trick! Much simpler than digging around with line segments and such. My old solution to this problem was so clunky and slow I'm embarrassed to post it. Thanks so much for sharing this. -paul On Sat, Nov 5, 2011 at 9:39 PM, Gökhan Sever gokhanse...@gmail.com wrote: Hi, I

Re: [Matplotlib-users] use shapefile to create a mask?

2011-11-03 Thread Paul Hobson
To the best of my knowledge, this beyond the scope of matplotlib. Scipy or Shapely *might* have something for you, but you best bet is to look into the raster clipping functionality of GDAL/OGR. Hope that helps, -paul On Thu, Nov 3, 2011 at 3:40 PM, questions anon questions.a...@gmail.com wrote:

[Matplotlib-users] Matplotlib typography (general discussion)

2011-10-25 Thread Paul Hobson
I am hoping to have a general discussion about font choices other matplotlib users make when the figure will be seen by someone other than yourself. Generally speaking, my figures go in to technical memos, automatically generated reports, and on rare occasion a web page. For memos (created in

Re: [Matplotlib-users] one pixel white border : bug ?

2011-09-09 Thread Paul Hobson
Ben and Yves, Might this be behavior defined in the matplotlibrc file? In [21]: import matplotlib as mpl In [22]: mpl.rcParams['figure.edgecolor'] Out[22]: 'w' -paul On Fri, Sep 9, 2011 at 9:37 AM, Benjamin Root ben.r...@ou.edu wrote: On Fri, Sep 9, 2011 at 3:49 AM, Yves Revaz

Re: [Matplotlib-users] it is possible to use basemap to create regular spaced lat/lon grids?

2011-09-06 Thread Paul Hobson
On Tue, Sep 6, 2011 at 12:58 PM, Benjamin Root ben.r...@ou.edu wrote: I don't know the full details, but the idea was that we didn't want to have SciPy as a dependency, so mlab was used to replicate many of the functions found in SciPy.  I don't know why the calling conventions are different,

Re: [Matplotlib-users] Help in graph

2010-10-19 Thread Paul Hobson
the label as in the example image?: Data from Riess et al (2004) Thanks, Waleria. On Tue, Oct 19, 2010 at 3:50 PM, Paul Hobson pmhob...@gmail.com wrote: Waléria, Hopefully this example helps: # code... import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) ax.plot

Re: [Matplotlib-users] Dashed line step plot

2010-09-17 Thread Paul Hobson
Same here. -paul h. On Fri, Sep 17, 2010 at 2:21 PM, Jeffrey Blackburne jblackbu...@gmail.com wrote: I get a solid line for plt.step like you do. MPL 1.0.0, SVN revision 8657. -Jeff On Sep 17, 2010, at 4:34 PM, Gökhan Sever wrote: Hello, Can someone confirm me if this creates a dashed

<    1   2