Re: [Matplotlib-users] Asking for help modifying a matplot windrose graphic using Python (:

2013-07-22 Thread Paul Hobson
Guilherme, Check out my implementation of windroses here: https://github.com/phobson/python-metar/blob/master/metar/graphics.py#L138 On Mon, Jul 22, 2013 at 11:54 AM, Guilherme Araújo Martins < gami...@globo.com> wrote: > Hello guys. > I'm having a problem with a matplot graphic and I guess it

Re: [Matplotlib-users] Font in figures needs to load a specific latex package \usepackage{tipa}

2013-07-25 Thread Paul Hobson
On Thu, Jul 25, 2013 at 12:16 PM, Jeffrey Spencer wrote: > I want to use IPA vowel labels in my figures and to do that I need to load > the package in latex \usepackage{tipa}. Is this possible as searching > online besides using the new backend "pgf" I haven't seen how to manually > select latex p

Re: [Matplotlib-users] [matplotlib-devel] I have a Mac!

2013-08-16 Thread Paul Hobson
Mike, That's great news. Is there any chance we can look forward to "official" instructions for setting up a Mac to develop matplotlib? I gave up a long time ago and started piecing to together my meager PRs in a linux VM. -paul On Fri, Aug 16, 2013 at 6:52 AM, Michael Droettboom wrote: > Tha

Re: [Matplotlib-users] x axis non-uniform labeling (KURT PETERS)

2013-09-30 Thread Paul Hobson
On Mon, Sep 30, 2013 at 1:43 PM, KURT PETERS wrote: > I'm including the code below to demonstrate the problem. The top should > have simtimedata (0 through 28) labeling the points. As you can see, > MATPLOTLIB just distributes those values evenly instead of assigning them > properly. > Any idea

Re: [Matplotlib-users] x axis non-uniform labeling (KURT PETERS)

2013-10-01 Thread Paul Hobson
On Mon, Sep 30, 2013 at 4:50 PM, KURT PETERS wrote: > That doesn't seem to fix it. What I'm expecting is at the top, 28 should > correspond to the value -2. Instead it puts a 30 there. > Kurt > > It's not really clear to me what you're trying to do. But the rounding of the axes limits is an ex

Re: [Matplotlib-users] indicating directions on stereographic projection.

2013-11-06 Thread Paul Hobson
On Wed, Oct 23, 2013 at 9:30 PM, Sourav Chatterjee wrote: > Hello, > > I have stereographic projection of the pole. I need to indicate the > directions like north,south,east, west, north-east, north-west and so on. > Is there any way to do so? > > Thanks > Sourav > > I am **very far** from a GIS e

Re: [Matplotlib-users] axes labelling

2013-11-23 Thread Paul Hobson
Hey Sourav, This example should demonstrate the basics of setting xticks and xticklabels http://matplotlib.org/examples/ticks_and_spines/ticklabels_demo_rotation.html On Sat, Nov 23, 2013 at 4:27 AM, Sourav Chatterjee wrote: > Hi, I have simple xy plot using below. > > import matplotlib.pyplot

Re: [Matplotlib-users] Normalizing Marker Size in Legend

2013-12-05 Thread Paul Hobson
Matthew, I think you're on the right track. You need proxy artists of some sort. You can create Line2D objects directly, never add them to the figure, and then use those to create the legend. An alternatively/hacky approach I often use is to the plot all the real data with '_nolegend' labels, get

Re: [Matplotlib-users] Nanoseond timestamp on x axis

2013-12-19 Thread Paul Hobson
Here are a couple of examples of using custom formats: http://matplotlib.org/examples/api/date_index_formatter.html http://matplotlib.org/examples/pylab_examples/date_demo2.html And here's a link with all of the possible formatting strings: http://www.tutorialspoint.com/python/time_strftime.htm

Re: [Matplotlib-users] Interative legend manipulation?

2014-01-07 Thread Paul Hobson
I believe (as of v1.3.1) that after you create the legend you call leg.draggable(True) http://matplotlib.org/api/legend_api.html#matplotlib.legend.Legend.draggable On Tue, Jan 7, 2014 at 6:37 AM, Skip Montanaro wrote: > Sometimes the legend simply gets in the way. You can't always guess > the

Re: [Matplotlib-users] Most generic way to wrap collections

2014-01-07 Thread Paul Hobson
Adam, Not sure if this is the try you're trying to bark up, but I've used a total hack to do what I think you're describing: 1) store lists of coordinate pairs in a pandas DataFrame 2) use df.apply() to turn each list of coords in to a patch and add to an axes object I'm sure you know this, but

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
As the error message says, the problem is on Line 14: print f.variables['WWSWHGT_P0_L1_GLL0'] a KeyError means that you tried to access an element that is not in a dictionary. In this case "f.variables" is the dictionary and "' WWSWHGT_P0_L1_GLL0'" is the element. Did your data and script come o

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
I think you posted the same image in both cases. Without seeing the problematic image, I can only guess that it's caused by the resolution of your data. On Thu, Jan 9, 2014 at 7:58 AM, A Short wrote: > Hi Paul, > > Thanks for your reply, I managed to fix it after I realised the mistake I > was

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
What I'm saying is that your top image and bottom image are identical and I don't see any white boxes in either. What is the resolution of the grid? -paul On Thu, Jan 9, 2014 at 11:59 AM, A Short wrote: > ok the file im using is this multi_2.glo_30m.t06z.grib2 from here >

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
How does it look if you remove the calls to `m.drawcoastlines()` and ` m.fillcontinents()`? On Thu, Jan 9, 2014 at 1:05 PM, A Short wrote: > Thats strange they look different on this browser. Hopefully the one below > youll see what i mean > > Thanks > >

Re: [Matplotlib-users] Plotting NOAA grib2 data in basemap

2014-01-09 Thread Paul Hobson
Looks like it's just a coarse resolution to me. Try showing the data as an image with no iterpolation. On Thu, Jan 9, 2014 at 3:26 PM, A Short wrote: > Ive also changed the grib file from multi_2.glo_30m.t06z.grib2 to > nww3.t12z.grib.grib2 i still cant figure out which is the right file for >

Re: [Matplotlib-users] Plotting a series of 3d quadrilaterals as a wireframe

2014-02-05 Thread Paul Hobson
Not quite sure exactly what you need to do, but it sounds like separate calls to `plot` for each quadrilateral will do the trick. -paul On Wed, Feb 5, 2014 at 4:57 PM, Pedro Marcal wrote: > I don't know how to separately plot the quadrilaterals after plotting each > of them in a closed loop eg

Re: [Matplotlib-users] Documentation for mpl_toolkits.basemap

2014-02-13 Thread Paul Hobson
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 wrote: > Hi All, > > I am new to this list so I apologize if this is supp

Re: [Matplotlib-users] plotting two functions on the same figure but with two different scales on y axis

2014-02-14 Thread Paul Hobson
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.gabrielebrambi...@gmail.com> wrote: > Hi, > > I'm trying to plot two functions on

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread Paul Hobson
Adam, Look into the seaborn project: http://nbviewer.ipython.org/github/mwaskom/seaborn/blob/master/examples/aesthetics.ipynb it's easy enough to define your own color palettes or select existing ones. -paul On Mon, Feb 17, 2014 at 11:41 AM, Adam Hughes wrote: > I'm wondering if the matplotlib

Re: [Matplotlib-users] colorbllind problem

2014-02-17 Thread Paul Hobson
= str(angol) > > imig = axius.plot(logeels, fittedval, label=angli) > > axius.legend(bbox_to_anchor=(1.05, 1), loc=9, borderaxespad=0.) > > lotgr.canvas.draw() > > thanks > > Gabriele > > > 2014-02-17 14:46 GMT-05:00 Paul Hobson : > > Adam,

Re: [Matplotlib-users] colorbllind problem

2014-02-18 Thread Paul Hobson
< > gb.gabrielebrambi...@gmail.com>: > > it works, thank you. >> >> Using a color palette that changes only the intensity/light of the color >> (all blue lines) helps. >> >> Gabriele >> >> >> 2014-02-17 20:57 GMT-05:00 Paul Hobson : >>

Re: [Matplotlib-users] [os x] Can't get IPython to use latest version of matplotlib

2014-02-21 Thread Paul Hobson
It appears that you have two different version of python installed (Apple's 2.7.3 and python.org's 2.7.5). You have to install all third-party packages to the correct one. It appears pip in acting on Apple's python. On Fri, Feb 21, 2014 at 2:08 PM, Timothy Duly wrote: > Hello, > > I recently up

Re: [Matplotlib-users] grid of subplot

2014-02-23 Thread Paul Hobson
You're not adding your subplot to an existing figure, so a new one is created. put "fig = plt.figure(...)" at the top of your script and replace "axii = plt.subplot(numalp, numobs, axisNum)" with "axii = fig.add_subplot(numalp, numobs, axisNum)" On Sat, Feb 22, 2014 at 5:28 PM, Gabriele Brambill

Re: [Matplotlib-users] Loding CSV file and plotting histogram of a particular column

2014-02-28 Thread Paul Hobson
Sounds like you want to use pandas, not numpy. import pandas import matplotlib.pyplot as plt df = pandas.read_csv('myfile.txt', sep='\t') plt.hist(data['A'], bins=30) ...should do it for you. On Fri, Feb 28, 2014 at 11:06 AM, AR12 wrote: > Hi, > > I have a csv file where head -5 looks like th

Re: [Matplotlib-users] imshow for .png- low resultion

2014-03-05 Thread Paul Hobson
Olga Botnivik is doing some work with these types of figures in her fork of the seaborn project. Example here: http://nbviewer.ipython.org/gist/olgabot/8341784 Link to the PR in github: https://github.com/mwaskom/seaborn/pull/73 Those might be a good place to start. On Wed, Mar 5, 2014 at 12:19

Re: [Matplotlib-users] multiplot in a for loop

2014-03-10 Thread Paul Hobson
Gabriele, I'm confused. I only see 1 series in each subplot. Could you trim your example down into some code that we can copy, paste, and run? A more thorough description of the problem might help too. -p On Mon, Mar 10, 2014 at 9:39 AM, Gabriele Brambilla < gb.gabrielebrambi...@gmail.com> wrote

Re: [Matplotlib-users] multiplot in a for loop

2014-03-10 Thread Paul Hobson
h others... > > Thanks > > Gabriele > > > 2014-03-10 12:54 GMT-04:00 Paul Hobson : > > Gabriele, >> >> I'm confused. I only see 1 series in each subplot. Could you trim your >> example down into some code that we can copy, paste, and run? A more

Re: [Matplotlib-users] Is there interrest for an implementation of colour maps visualising small differences around 0

2014-03-14 Thread Paul Hobson
Pål, Matplotlib already has a jet colormap and has moved away from using it as the default for the very reasons listed in the first paper you site. How is your jet colormap different? Can you provide a comparison with the existing colormap? Does it overcome the drawbacks listed in the Sandia Nat'l

Re: [Matplotlib-users] Variable size markers legend formatting

2014-04-09 Thread Paul Hobson
On Wed, Apr 9, 2014 at 9:00 AM, Adam Hughes wrote: > Thanks. That's probably the way I'll go. At first, I thought creating > separate legend markers and removing them from the plot seemed hacky, but I > guess there's no way that matplotlib could know which legend size I want. > I wonder if the

Re: [Matplotlib-users] Variable size markers legend formatting

2014-04-11 Thread Paul Hobson
cle to appear in the legend, which I > presume should be: > > > > p = Circle((0, 0), fc="r") > > legend([p], ["Red Rectangle"]) > > > > > > On Wed, Apr 9, 2014 at 2:20 PM, Adam Hughes > wrote: > > Thanks Paul, I will try it out. > >

Re: [Matplotlib-users] Install under Win 7

2014-04-11 Thread Paul Hobson
You should be using conda to install matplotlib: conda create --name mpl33 matplotlib python=3.3 ipython-notebok source activate mpl33 On Fri, Apr 11, 2014 at 8:11 AM, grivet wrote: > Under Win7pro, I have tried to install matplotlib by running either > matplotlib-1.3.0.win32-py3.3.exe or > ma

Re: [Matplotlib-users] Install under Win 7

2014-04-11 Thread Paul Hobson
You're on windows, so that last command is just "activate mpl33" On Fri, Apr 11, 2014 at 7:05 PM, Paul Hobson wrote: > You should be using conda to install matplotlib: > > conda create --name mpl33 matplotlib python=3.3 ipython-notebok > source activate mpl33 > &g

Re: [Matplotlib-users] Make clear figure used in the powerpoint slides?

2014-04-20 Thread Paul Hobson
What parameters are you passing to `savefig`? On Sat, Apr 19, 2014 at 1:13 PM, Chao YUE wrote: > Dear all, > > Did anyone try to make plots using matplotlib, and then put the figure in > the powerpoint for presentation? Currently I am using the ipython notebook > --pylab mode to make the plots,

Re: [Matplotlib-users] Make clear figure used in the powerpoint slides?

2014-04-20 Thread Paul Hobson
Sorry hit send by accident? What parameters are you passing to `savefig`? For a presentation, I would save as a .png file, a higher resolution and a transparent background. e.g.: fig.savefig('myfig.png', dpi=600, bbox_inches='ticht', transparent=True) On Sun, Apr 20, 20

Re: [Matplotlib-users] datestr2num for day/month/year

2014-04-25 Thread Paul Hobson
You might have more luck reading in that data (dates with mixed format) with pandas than numpy. On Fri, Apr 25, 2014 at 2:37 AM, Mark Bakker wrote: > Thanks, Andreas, but it doesn't quite work. > > This works for me (I manually changed all dates to 'day-month-year' for > testing): > > a = load

Re: [Matplotlib-users] installation problem

2014-04-29 Thread Paul Hobson
As the error says, you need the dateutil package. It available here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-dateutil On Mon, Apr 28, 2014 at 11:10 PM, Stam Golesh wrote: > hi all > > downloaded and installed > matplotlib-1.3.1.win32-py3.2.exe > > this is what i get > >>> import matpl

Re: [Matplotlib-users] Which api to learn?

2014-04-30 Thread Paul Hobson
The only pyplot function I let myself use is plt.subplots() to quickly create the Figure and Axes objects. From that point on, I operate on those objects directly. Frankly, it reads almost exactly like pyplot code, but it is a *lot* more clear what's going on. On Wed, Apr 30, 2014 at 4:49 AM, Nea

Re: [Matplotlib-users] matplot crases because of XDG_CONFIG_HOME variable

2014-05-07 Thread Paul Hobson
How did you install matplotlib? I've had success using anaconda on cheap $7/month web servers before http://continuum.io/downloads On Wed, May 7, 2014 at 7:20 AM, Paul Tremblay wrote: > I am using matplotllib as part of web server. matplotlib causes my server > to crash with this error: > > File

Re: [Matplotlib-users] Pick a particular data from array

2014-06-17 Thread Paul Hobson
Based on the example you posted, you need like: import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.contour(data) ax.axhline(magic_value) On Mon, Jun 16, 2014 at 1:30 AM, dydy2014 wrote: > Hello all, > > I have contour plot like this and I have problem to pick a particular data > along

Re: [Matplotlib-users] (no subject)

2014-09-05 Thread Paul Hobson
How do you do this in a normal LaTeX document? On Fri, Sep 5, 2014 at 12:53 PM, Arnaldo Russo wrote: > Hi, > > I'm trying to figure out how I could use greek letters on axis labels, > without italic. > I have read a lot about alternatives, but I do need to use LaTeX to insert > a table inside t

Re: [Matplotlib-users] zoom a plot

2014-09-15 Thread Paul Hobson
I don't think you'll get acceptable performance out of that workflow. I recommend looking into the webagg backend: http://matplotlib.org/users/whats_new.html#webagg-backend On Mon, Sep 15, 2014 at 8:38 AM, Xiaobo Yang wrote: > Hi, I use matplotlib to create a png file, then display it in a web

Re: [Matplotlib-users] zoom a plot

2014-09-15 Thread Paul Hobson
Yes. They are on the same webpage to which I linked earlier. http://matplotlib.org/search.html?q=codex+webagg&check_keywords=yes&area=default On Mon, Sep 15, 2014 at 9:28 AM, Tom Young wrote: > Thank you for your quick answer. I understand the performance issue you > mentioned. For now it is on

Re: [Matplotlib-users] seg fault installing

2014-10-01 Thread Paul Hobson
You mean matplotlib 1.3.1 and numpy 1.8.1, right?-- Paul Hobson Sorry if this is unintelligible. I'm on my phone. On Wed, Oct 1, 2014 at 9:36 AM, Steve McAfee wrote: > This is really old. It's a readynas from netgear running etch with a bunch > of backports. It seems that somet

Re: [Matplotlib-users] xkcd

2014-10-03 Thread Paul Hobson
That's what the `with` statement allows you do. Say you have a function that does some plotting and returns a figure -- call it my_plot_func. You can do: fig1 = my_plot_func() fig1.savefig('normal1.png') with plt.xkcd(): fig2 = mu_plot_func() fig2.savefig('xkcd.png') fig2 = my_plot_fun

[Matplotlib-users] Using unregistered scales

2014-10-06 Thread Paul Hobson
MPL Users, Using [1] as a template, I built a ProbabilityScale[2] which I hope one day will be in the statsmodels library. It still needs some work, but it's mostly there. I have, what I hope is a basic question: Do I have to register the scale in order to use it, or is there an axes method to fe

Re: [Matplotlib-users] Using unregistered scales

2014-10-07 Thread Paul Hobson
Here's that second link for the scale: https://gist.github.com/phobson/3cc3550ce1efcc299142 On Mon, Oct 6, 2014 at 1:27 PM, Paul Hobson wrote: > MPL Users, > > Using [1] as a template, I built a ProbabilityScale[2] which I hope one > day will be in the statsmodels library. It

Re: [Matplotlib-users] python3 and basemap bluemarble()

2014-10-17 Thread Paul Hobson
Tom, I believe the "pillow" package is the actively maintained fork of PIL. Could be wrong on that though. -p On Fri, Oct 17, 2014 at 4:27 AM, Tommy Carstensen < tommy.carsten...@gmail.com> wrote: > To matplotlib-users, > > basemap bluemarble() requires PIL, which is not available for Python3. >

Re: [Matplotlib-users] 2 overlaid plots with grid??

2014-10-22 Thread Paul Hobson
I seem to recall that the MaxNLocator and some carefully chosen axes limits suffices for me in the past. On Tue, Oct 21, 2014 at 11:44 AM, Adam Hughes wrote: > I wrote a program that draws grids manually on mpl plots a while back. If > you can't find a solution can you write back here and I'll

Re: [Matplotlib-users] matplotlib save image as postscript, when xlabel is saved as text and not path

2014-11-03 Thread Paul Hobson
What happens when you save as a postscript file with matplotlib.rcParams["text.usetex"] = False? -paul On Mon, Nov 3, 2014 at 7:11 AM, Oren wrote: > Anyone know how to solve this thing? > > Thanks. > > On 2 November 2014 03:40, oren wrote: > >> How can I save a matplotlib figure with text as a

Re: [Matplotlib-users] matplotlib save image as postscript, when xlabel is saved as text and not path

2014-11-03 Thread Paul Hobson
ext and the other is path of points.. > > > Thank You, > Oren. > > > > > On 3 November 2014 21:40, Paul Hobson wrote: > >> What happens when you save as a postscript file with >> matplotlib.rcParams["text.usetex"] = False? >> -paul >>

Re: [Matplotlib-users] Basemap from proj4 string

2014-11-05 Thread Paul Hobson
I think some examples would help. Which proj4 string are you looking to use? How are you currently constructing the map? -p On Wed, Nov 5, 2014 at 7:53 AM, knutfrode wrote: > Does anyone know if this is possible? > > > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabbl

Re: [Matplotlib-users] Can not display 3D plot !

2014-11-13 Thread Paul Hobson
Does a fresh conda environment help? On Wed, Nov 12, 2014 at 5:38 PM, Geoffrey Mégardon < geoffrey.megar...@gmail.com> wrote: > Yes, I may forget to tell, but this code is 100% working, it work on other > installations I have. So the problem is not in the code. > > It is just that on my current l

Re: [Matplotlib-users] Can not display 3D plot !

2014-11-13 Thread Paul Hobson
< geoffrey.megar...@gmail.com> wrote: > I uninstall and reinstall Anaconda. > That still does not work :/ > Is it possible there is like OpenGL problem, graphic card driver problem, > or something linked to displaying 3d? > > On 13 November 2014 13:32, Paul Hobson wrote:

Re: [Matplotlib-users] multiple plots on single axis

2014-11-27 Thread Paul Hobson
Check out the third example in the gallery: Gallery Link: http://matplotlib.org/gallery.html Direct Link: http://matplotlib.org/examples/lines_bars_and_markers/fill_demo_features.html On Thu, Nov 27, 2014 at 6:55 AM, Bala subramanian wrote: > Friends, > > I want to make multiple graphs on a sin

Re: [Matplotlib-users] two axes

2014-12-02 Thread Paul Hobson
You didn't label any of the series that you put on the graph, so the legend has no idea what to call anything thing. Like the warning (not error) says, use the label parameter on your calls to plot, e.g., ax1.plot(..., label='Concentration') or whatever. Note though, that you're mixing up interfa

Re: [Matplotlib-users] [matplotlib-devel] Matplotlib style gallery

2015-01-05 Thread Paul Hobson
Tony! This is very cool. Bravo. On Mon, Jan 5, 2015 at 8:42 PM, Tony Yu wrote: > I've been playing around with learning Javascript lately. As part of the > process, I created a Flask app to build a gallery for matplotlib style > sheets: > > https://github.com/tonysyu/matplotlib-style-gallery > >

Re: [Matplotlib-users] contour3D in matplotlib

2015-01-20 Thread Paul Hobson
The gallery had a comprehensive set of available three dimensional plots, I think. http://matplotlib.org/gallery.html#mplot3d On Tue, Jan 20, 2015 at 01:19 Nils Wagner wrote: > Hi all, > > I found > > > http://stackoverflow.com/questions/9419451/3d-contour-plot-from-data-using-mayavi-python > >

Re: [Matplotlib-users] using it in a Qt5-Widget

2015-01-28 Thread Paul Hobson
At the top of www.matplotlib.org, there is an "examples" link. Scroll down a bit, there's a section titled "user interface examples" http://matplotlib.org/examples/user_interfaces/index.html The QT4 example works on my machine currently, so it's reasonably up to date. -p On Wed, Jan 28, 2015 at

Re: [Matplotlib-users] synchronize magnification of subplots?

2015-02-03 Thread Paul Hobson
I only have the notebook to mes around in, but the following works for me: %matplotlib nbagg import matplotlib.pyplot as plt fig, ax = plt.subplots(nrows=2, sharex=True, sharey=True) On Tue Feb 03 2015 at 4:07:26 PM Neal Becker wrote: > I have 2 subplots, 2 rows 1 col. They have the same x-ax

Re: [Matplotlib-users] How to add data points to a contour map.

2015-02-12 Thread Paul Hobson
Definitely. Assuming you don't want to do this in an interactive manner (i.e. pointing and clicking with your mouse: fig, ax = plt.subplots() ax.contour(...) ax.plot(x_dots, y_dots, 'ro', label='Dots') -p On Thu, Feb 12, 2015 at 8:07 AM, Dr Sydney Shall wrote: > I am a beginner and I use Pytho

Re: [Matplotlib-users] Problems with pyplot and cm in Matplotlib ver. 1.4.3

2015-02-21 Thread Paul Hobson
Hey Starfighter,  I want to help, but I also don't like unzipping files from strangers. Can you make a simple script that generates some fake with numoy and the handful of matplotib commands you need to make the figure.  -p — Sent from Mailbox On Sat, Feb 21, 2015 at 7:34 PM, Starfighter

Re: [Matplotlib-users] Corr plot in subplot

2015-03-13 Thread Paul Hobson
What's the function signature of corrplot.CorrPlot? Hopefully you can pass an Axes object to it argument. -p On Fri, Mar 13, 2015 at 9:02 AM, Sudheer Joseph wrote: > Dear Matplotlib exprets, > I am trying to place the corrplot in subplot environment. But not able to > figure out how to do it pro

Re: [Matplotlib-users] Corr plot in subplot

2015-03-17 Thread Paul Hobson
Re: [Matplotlib-users] Corr plot in subplot > To: "Paul Hobson" , "Adam Hughes" > > Cc: "Matplotlib Users" > Date: Tuesday, 17 March, 2015, 8:31 AM > > Hi Paul, >                 I could not succeed in > plotting corrplot.Corrplot(df,

Re: [Matplotlib-users] ImportError: No module named six

2015-03-17 Thread Paul Hobson
You need to install the six module, no matter which version of Python you use.  — Sent from Mailbox On Tue, Mar 17, 2015 at 10:31 AM, garyr wrote: > I downloaded version 1.4.3 and installed it (i.e., executed > matplotlib-1.4.3.win32-py2.6.exe). Now when I > attempt to run a program I get th

Re: [Matplotlib-users] segmentation fault when saving images

2015-03-19 Thread Paul Hobson
What happens when you edit your program to avoid dividing by zero? -p — Sent from Mailbox On Thu, Mar 19, 2015 at 10:14 AM, Gabriele Brambilla wrote: > Hi guys, > I don't understand why now, after I save an image when it is prompted out, > the image is not saved and it closes automatically a

Re: [Matplotlib-users] Interactive Applications using Matplotlib

2015-03-31 Thread Paul Hobson
Congrats, Ben. I know you've been working hard on this for a long time and I'm sure it'll be a great value to those looking to use matplotlib beyond just making a quick figure for a report.  -Paul  — Sent from Mailbox On Tue, Mar 31, 2015 at 11:02 AM, Benjamin Root wrote: > The book I have

Re: [Matplotlib-users] GridSpec.GridSpecFromSubplotSpec.update()

2015-04-03 Thread Paul Hobson
Hey Julian, I'm not familiar enough from gridspec to help, but your emails were received by the list. If no one on the list has (time to write) a response, I would recommend making your example a little more reproducible (e.g., what are a and b?) and posting it on stackoverflow. On Fri, Apr 3,

Re: [Matplotlib-users] [matplotlib-devel] Easy problem working with dev library

2015-05-16 Thread Paul Hobson
want.  ​-Paul.  On Sat, May 16, 2015 at 5:52 PM, Paul Hobson wrote: After you've setup your development environment with all of the MPL dependencies, navigate to the MPL source directory and install it with: $ python setup.py develop or $ pip install -e . That'll c

Re: [Matplotlib-users] plot() and imshow() relationship

2015-05-29 Thread Paul Hobson
imshow is for displaying arrays as images/rasters. plot is for showing data/functions as points and lines. See the gallery for imshow: http://matplotlib.org/gallery.html#images_contours_and_fields On Fri, May 29, 2015 at 4:12 AM, Amit Saha wrote: > Hi all, > > I am trying to understand if the

Re: [Matplotlib-users] [matplotlib-devel] RFC: candidates for a new default colormap

2015-06-05 Thread Paul Hobson
On Fri, Jun 5, 2015 at 9:17 AM, Jody Klymak wrote: > > > Anyways, I guess I am advocating trying to find a colormap with a very > obvious central hue to represent zero. Anomaly data sets are *very* > common, so having a default colormap that doesn’t do something reasonable > with them may be a t

Re: [Matplotlib-users] [matplotlib-devel] RFC: candidates for a new default colormap

2015-06-05 Thread Paul Hobson
Dang it, Joe, How do you do everything l try to do like 1000x better? Guess I'll be closing this: https://github.com/matplotlib/matplotlib/pull/3858 -paul On Fri, Jun 5, 2015 at 2:57 PM, Joe Kington wrote: > Not to plug one of my own answers to much, but here's a basic example. > http://stack

Re: [Matplotlib-users] for Posterior predictive data distributions

2015-06-07 Thread Paul Hobson
(apologies if the list receives this twice) On Fri, Jun 5, 2015 at 9:14 AM, Juan Wu wrote: > >> Hi, Experts, >> >> My colleagues and I have a question, how we can make a plot via python >> like below. According to a guy's original paper, "Each panel shows the >> normalized histograms of the obser

Re: [Matplotlib-users] Basemap Problems

2015-06-08 Thread Paul Hobson
Edgar, You feed lat/lon (float) values. See this example here: http://matplotlib.org/basemap/users/cea.html And a whole collection of setting up maps in other projection here: http://matplotlib.org/basemap/users/mapsetup.html You also need to make sure that all of inputs make sense together (e.g

Re: [Matplotlib-users] custom x axis integers boxplot

2015-06-13 Thread Paul Hobson
Probably a better way would be to the the "pos" arguments to boxplot (bp=boxplot(array, pos=range(11, 36)). That *should* work. Let me know if it doesn't. On Fri, Jun 12, 2015 at 4:36 PM, pb89 wrote: > thanks for the quick answer Jeffrey, its working! > > -peter > > > > -- > View this message in

Re: [Matplotlib-users] custom x axis integers boxplot

2015-06-13 Thread Paul Hobson
Oh sorry that should be "... positions=np.arange(11, 36)) On Sat, Jun 13, 2015 at 7:49 AM, pb89 wrote: > it tried this before, but it throws an exception: > > TypeError: boxplot() got an unexpected keyword argument 'pos' > > > > > > -- > View this message in context: > http://matplotlib.1069221

Re: [Matplotlib-users] custom x axis integers boxplot

2015-06-16 Thread Paul Hobson
You want to use a MultipleLocator: http://matplotlib.org/examples/pylab_examples/major_minor_demo1.html -paul On Mon, Jun 15, 2015 at 6:16 PM, pb89 wrote: > hey guys, is it also possible to only show every 5th number of that array? > Its a little too much right now: > < > http://matplotlib.1069

Re: [Matplotlib-users] Produce KML from Matplolib

2015-06-21 Thread Paul Hobson
Eric, You'll be producing the KML from pythonor some other python package. GIS I/O is well beyond matplotlib's scope. This gis,stackexchange thread seems promising: http://gis.stackexchange.com/questions/22519/create-a-ground-overlay-kml-from-georeferenced-raster On Wed, Jun 10, 2015 at 1:07 AM

Re: [Matplotlib-users] Misleading BoundaryNorm error

2015-07-29 Thread Paul Hobson
On Wed, Jul 29, 2015 at 3:18 AM, Fabien wrote: > Folks, > > still in my exploring phase of Matplotlib's ecosystem I ran into > following mismatch between the APIs of BoundaryNorm and Normalize. > > See the following example: > > import matplotlib as mpl > c = mpl.cm.get_cmap() > bnorm = mpl.color

Re: [Matplotlib-users] @image_comparison decorator and unittests

2015-07-30 Thread Paul Hobson
47 AM, Jens Nielsen wrote: > Thomas Robitailles pytest image comparison plugin might also be of > interest > https://github.com/astrofrog/pytest-mpl > > Jens > > tor. 30. jul. 2015 kl. 14.43 skrev Thomas Caswell : > >> >> Paul Hobson expressed inte

Re: [Matplotlib-users] boxplot behaviour in an extreme scenario

2015-08-26 Thread Paul Hobson
Are you running python 2 or python 3? If you're on python 2, what happens if you add "from __future__ import division" to the top of your script? On Tue, Aug 25, 2015 at 10:31 PM, chtan wrote: > Hi, > > the outliers in the boxplot do not seem to be drawn in the following > extreme > scenario: >

Re: [Matplotlib-users] boxplot behaviour in an extreme scenario

2015-08-26 Thread Paul Hobson
Open to a different interpretation of what should be happening, though. On Wed, Aug 26, 2015 at 1:08 AM, Paul Hobson wrote: > Are you running python 2 or python 3? If you're on python 2, what happens > if you add "from __future__ import division" to the top of your script?

Re: [Matplotlib-users] boxplot behaviour in an extreme scenario

2015-08-26 Thread Paul Hobson
Even though I'm familiar with the boxplot source code, I largely use IPython for quick investigations like this. In IPython, doing something like "matplotlib.Axes.boxplot??" shows the full source code for that functions\. Then I saw/remembered that boxplot now just calls matplotlib.cbook.boxplot_

Re: [Matplotlib-users] register colormap collection

2015-10-01 Thread Paul Hobson
On Thu, Oct 1, 2015 at 9:40 AM, Thomas Caswell wrote: > Have a look at how cmocean (https://github.com/matplotlib/cmocean) works > under the hood. > > I think the options are: >- use a module to supply your color maps (from my_cmap_collection > import my_cmap) and then pass those objects thro

Re: [Matplotlib-users] subplot layout

2016-04-25 Thread Paul Hobson
Your basemap plot is likely setting the aspect of the axes to "equal", so it resizes the plot accordingly. Otherwise you'd have a pretty nasty amount of vertical distortion. When you save the figure, using bbox_inches='tight' will trim the excess white space from the margins: fig.savefig('map_and_

Re: [Matplotlib-users] subplot layout

2016-04-25 Thread Paul Hobson
ipod.com > ******* > > > On Mon, 25/4/16, Paul Hobson wrote: > > Subject: Re: [Matplotlib-users] subplot layout > To: "Sudheer Joseph" > Cc: "Matpl

Re: [Matplotlib-users] License, freetype

2017-02-17 Thread Paul Hobson
Chad, My recollections is that matplotlib doesn't distribute the source code to FreeType, it only uses it as a dependency. As such, MPL is in the clear with its more permissive licensing. -Paul On Fri, Feb 17, 2017 at 12:45 PM, CAB wrote: > Hi, All, > > I just went to install matplotlib version

Re: [Matplotlib-users] [matplotlib-devel] License, freetype

2017-02-18 Thread Paul Hobson
h I'd > rather not do because I have Python already installed. > > If you have any other ideas, I'd be happy to hear them. > > Best, > Chad > > > ------ > *From:* Joe Kington > *To:* Paul Hobson > *Cc:* CAB ; Matplotlib Dev

[Matplotlib-users] Setting boxplot confidence intervals manually

2011-10-07 Thread Paul Hobson
Hey folks, I'm working on a patch to axes.boxplot that will allow the user to manually specify the median and confidence intervals (notches) on a boxplot. My need for this arises since I compute the notch locations using the BCa-method, which depends on Scipy. My question relates to how to best h

[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 your

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 wrote: > Hi All, > Is there a w

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 wrote: > Hi, > I was wondering this abo

Re: [Matplotlib-users] pie colors

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

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, 2012

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 = plt.sub

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 tha

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 = Basemap(llcrnrlon=-11.5,llcrnrlat=51.0,urcrnrlon=-4.5,urcrn

Re: [Matplotlib-users] draw lines in basemap

2012-03-01 Thread Paul Hobson
6417, -9.4344939] x, 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 wrote: > David, > > The loop is you have is u

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 wrote: > Nicolas Rougier, (to Mic, who can't see a histogram and a line > simultaneously

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

  1   2   >