Re: [Matplotlib-users] mulidimension data

2017-06-28 Thread Benjamin Root
Diego, It isn't really clear from your description what the problem is. Is the problem that the sub-vectors aren't all of equal lengths (i.e., a staggered array)? Or is it that it is transposed from what you'd expect? Ben Root On Tue, Jun 27, 2017 at 9:07 AM, Diego Avesani wrote: > Dear all Ma

Re: [Matplotlib-users] plot control

2017-04-19 Thread Benjamin Root
This would seem like a bug in that package's code. The traceback shows that it is performing its own check on the passed in kwargs, and failing to recognize it as a valid argument. I suggest contacting the maintainers of the "skill_metrics" package and find out from them if there is a bug in their

Re: [Matplotlib-users] Plotting speed and error when calling update() using TkAgg

2017-04-18 Thread Benjamin Root
I am wondering if the "optimizations" you have are actually slowing you down. I have never found myself needing to flush_events() or call update() like that. Or to draw the artists like you are doing. Without seeing more of the code, it is hard to judge. Have you tried using "runsnakerun" to profil

Re: [Matplotlib-users] accessing axis artist objects for an axes object

2016-09-07 Thread Benjamin Root
draw the grid line labels myself. > > On Wed, Sep 7, 2016 at 9:04 AM, Benjamin Root > wrote: > > Hmm, strange. Well, I know this works in mplot3d (we have a test for it) > > > > for i, tick in enumerate(ax.yaxis.get_major_ticks()): > > tick.set_pad(tick

Re: [Matplotlib-users] accessing axis artist objects for an axes object

2016-09-07 Thread Benjamin Root
AM, Hearne, Mike wrote: > I couldn't find an rcParams property called "tickpad". I did find > "xtick.major.pad", which was set to 4.0. Setting it to a negative > value has no effect. xtick.minor.pad doesn't do anything either. > > On Wed, Sep 7, 2

Re: [Matplotlib-users] accessing axis artist objects for an axes object

2016-09-07 Thread Benjamin Root
I think you do that by setting a negative tickpad value in the rcParams. On Wed, Sep 7, 2016 at 11:28 AM, Hearne, Mike wrote: > Thomas - I hate to be obtuse, but did you mean to imply that the xaxis > and yaxis properties of an Axes object are AxisArtist objects? > IPython tells me that they are

Re: [Matplotlib-users] Fw: Matplotlib Figure margin transparancy

2016-08-10 Thread Benjamin Root
The other reason why this message never got posted is because this message was sent to the now defunct mailing list hosted by sourceforge. The mailing list moved about a year ago (I think) to python.org. You will have to subscribe in order to post unmoderated. https://mail.python.org/mailman/listi

Re: [Matplotlib-users] Matplotlib & Basemap / What is the Best Graphical Back-end for Raster Data Display (.png) ?

2016-03-03 Thread Benjamin Root
05 AM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Le 03/03/2016 15:43, Benjamin Root a écrit : > > Matplotlib will not work at all without AGG. Even the AGG-less > > backends still use AGG for image handling (imshow() and such). > > Is it so? I never fo

Re: [Matplotlib-users] Matplotlib & Basemap / What is the Best Graphical Back-end for Raster Data Display (.png) ?

2016-03-03 Thread Benjamin Root
Matplotlib will not work at all without AGG. Even the AGG-less backends still use AGG for image handling (imshow() and such). We can not guarantee that matplotlib would work with agg 2.5, as that is the GPL'ed version. We develop against a patched 2.4 branch of AGG (which is BSD-licensed), which i

Re: [Matplotlib-users] Matplotlib 1.5.1 - Function pcolormesh throws Segmentation Fault

2016-02-24 Thread Benjamin Root
Sorry, forgot to post the link: https://pypi.python.org/pypi/faulthandler/ On Wed, Feb 24, 2016 at 3:33 PM, Benjamin Root wrote: > Could you try using faulthandler and post the traceback please? That'll > help us isolate the problem better. > > Ben Root > > On Wed,

Re: [Matplotlib-users] Matplotlib 1.5.1 - Function pcolormesh throws Segmentation Fault

2016-02-24 Thread Benjamin Root
Could you try using faulthandler and post the traceback please? That'll help us isolate the problem better. Ben Root On Wed, Feb 24, 2016 at 3:04 PM, Claude Falbriard wrote: > Dear colleagues, > > I've done a build from source of latest *Matplotlib* package and > deployed it at our IBM z13 mac

Re: [Matplotlib-users] pyplot.hexbin

2016-01-30 Thread Benjamin Root
out > to numpy? > > > > On Fri, Jan 29, 2016 at 7:30 PM, Thomas Caswell > wrote: > >> Factor it out and give it to numpy! >> >> On Fri, Jan 29, 2016, 17:27 Benjamin Root wrote: >> >>> Hmm, you are right, there is no way to get back the

Re: [Matplotlib-users] pyplot.hexbin

2016-01-29 Thread Benjamin Root
Hmm, you are right, there is no way to get back the information that hexbin computed. The hexbin function is massive (in lib/matplotlib/axes/_axes.py) and is a bit tangled up with the artist-handling code, too. I think it would make sense to factor out the hexbinning component into its own hexbin.p

Re: [Matplotlib-users] Looking for feedback on figures using matplotlib and jupyter notebook

2016-01-28 Thread Benjamin Root
In mpl, our figure objects get numbers assigned to them by default, but they can also be strings. These labels are used in the figure window title bar. Perhaps that existing data could be hijacked? Admittedly, most people use the string name to give nice short names to their figures, so maybe those

Re: [Matplotlib-users] applying an image's colormap to another image

2016-01-28 Thread Benjamin Root
You might have better luck asking the scikit-image people, or the Pillow people. ImageMagick might also have what you are looking for. Cheers! Ben Root On Wed, Jan 27, 2016 at 11:23 PM, Matteo Niccoli wrote: > Can something like this (which by the way I can't get to work): > > http://stackover

Re: [Matplotlib-users] MultiCursor messes with xlim and ylim autoscaling

2016-01-20 Thread Benjamin Root
Add "blit=False" in the instantiation for multicursor to get around the copy_from_bbox issue. I wonder if the use of fig.axes might be a problem? On Jan 20, 2016 2:27 PM, "Bilheux, Jean-Christophe" wrote: > HI all, > > I wanted to help (for a change) but running the script on mac (with the > mul

Re: [Matplotlib-users] How do I make a Mercator map larger

2016-01-04 Thread Benjamin Root
Without seeing the code, it would be hard to tell what is wrong. Setting the figure size should work. I do this all the time myself. As for converting map coordinates to inches, are you talking about inches of the display? or inches of the map (as opposed to km or miles)? Ben Root On Sun, Jan 3,

Re: [Matplotlib-users] Set matplotlibrc color cycle to custom colors using axes.prop_cycle (v1.5)

2015-12-21 Thread Benjamin Root
You can't use the hash symbol when doing colors as a hex in an rcfile. The rcfile parser is so simple that it treats it as a comment. Don't drop the quotes. Ben Root On Mon, Dec 21, 2015 at 12:51 AM, Thomas Caswell wrote: > Not at a computer to test, but try dropping the quotes. > > On Sun, Dec

Re: [Matplotlib-users] SpanSelector span_stays does not work for me

2015-12-14 Thread Benjamin Root
Have you tried setting "useblit=False"? If that works, I wonder if we accidentally broke something in the recent widget interactivity work... Ben Root On Fri, Dec 11, 2015 at 7:48 PM, Edward Richards wrote: > I am selecting a region of a color plot with span selector, and I would > like the se

Re: [Matplotlib-users] Legend frame edgecolor and linewidth

2015-11-13 Thread Benjamin Root
Indeed, it looks like there isn't a very good way to control all of the properties of the frame portion of a legend. This could certainly use some improvements, partly in allowing a dictionary of property values to be passed in `plt.legend()` (there is already a dictionary of font properties), but

Re: [Matplotlib-users] Inset plot with a previously draw plot

2015-10-29 Thread Benjamin Root
An axes can only belong to one figure at a time. And I also don't think I have ever seen anyone try and transfer an axes from one figure to another. You *might* have luck with inset locators from axes_grid: http://matplotlib.org/examples/axes_grid/inset_locator_demo.html Cheers! Ben Root On Thu,

Re: [Matplotlib-users] basemap: how to plot "toothed" curves

2015-10-16 Thread Benjamin Root
ploited, instead. Cheers! Ben Root On Fri, Oct 16, 2015 at 10:24 AM, Benjamin Root wrote: > Hmmm, this is actually an interesting problem. I am also a meteorologist, > so this is interesting to me. > > I haven't figured it out yet, but here are my thoughts: > > 1) Ther

Re: [Matplotlib-users] basemap: how to plot "toothed" curves

2015-10-16 Thread Benjamin Root
Hmmm, this is actually an interesting problem. I am also a meteorologist, so this is interesting to me. I haven't figured it out yet, but here are my thoughts: 1) There are the "^" triangle markers as well as "2" tri_up markers: http://nbviewer.ipython.org/github/WeatherGod/AnatomyOfMatplotlib/bl

Re: [Matplotlib-users] TypeError: can't multiply sequence by non-int of type 'float'

2015-09-29 Thread Benjamin Root
You have some logic issues here. First off, I wouldn't be updating the plot in the same function that is updating the data values. Assuming that "loop_start()" is asynchronous, the update frequency for it is likely to be entirely different from the Animation update frequency. So, just have that fun

Re: [Matplotlib-users] TypeError: can't multiply sequence by non-int of type 'float'

2015-09-28 Thread Benjamin Root
Jerzy, On Mon, Sep 28, 2015 at 4:25 PM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > > Le 28/09/2015 21:03, Benjamin Root a écrit : > >> Where does he multiply a list by a float? The traceback shows the >> multiplication happening much further down in

Re: [Matplotlib-users] TypeError: can't multiply sequence by non-int of type 'float'

2015-09-28 Thread Benjamin Root
own in the draw stack. > Le 28/09/2015 17:43, Benjamin Root comments : > > Could you file a bug report? This is going to need some investigating. > > == > > I suspect that it can be solved without Hercule Poirot. > Convert *at the beginning* your lists x,y,z into np.arrays. >

Re: [Matplotlib-users] TypeError: can't multiply sequence by non-int of type 'float'

2015-09-28 Thread Benjamin Root
Confirmed using a fairly recent matplotlib checkout. Could you file a bug report? This is going to need some investigating. As a side note though, the way you are updating the lines by calling `ax.plot` repeatedly, is bad form. You want to update the lines object itself, by calling its "set_data()

Re: [Matplotlib-users] Fwd: bug report

2015-09-16 Thread Benjamin Root
Btw, I can't reproduce the problem using matplotlib master, numpy master and linux. I know it isn't at all similar to your setup, but it is a data point. On Wed, Sep 16, 2015 at 9:43 AM, Benjamin Root wrote: > What version of numpy do you have installed? > > On Wed, Sep

Re: [Matplotlib-users] Fwd: bug report

2015-09-16 Thread Benjamin Root
What version of numpy do you have installed? On Wed, Sep 16, 2015 at 5:35 AM, Bobby Wilkins wrote: > OS: Windows 8.1 Pro > > matplotlib version: 1.4.3 > > where obtained: http://www.lfd.uci.edu/~gohlke/pythonlibs/ > > customizations: none > > Sample Program: attached py file; this is a Physics h

Re: [Matplotlib-users] Creating axes with fixed distance from figure edge

2015-09-09 Thread Benjamin Root
What might be more generally useful is to make it easier to specify which coordinate system you wish some spec to apply to. To be frank, I can never keep the transform names straight, and it isn't possible to specify it at all in some places. On Sep 9, 2015 6:04 PM, "Thomas Robitaille" wrote: > I

Re: [Matplotlib-users] Matplotlib Curve Overlapping with Animated plot

2015-09-09 Thread Benjamin Root
Thales, Sorry for the delay in responding. This mailing list has actually moved to https://mail.python.org/mailman/listinfo/matplotlib-users Let's start up a new thread there with this information, plus also which version of matplotlib you are using and which backend. Cheers! Ben Root On Wed,

Re: [Matplotlib-users] Plotting from a data file

2015-08-14 Thread Benjamin Root
All "cbook.get_sample_data(..., asfileobj=False)" does is returns the full filename path to a given file stored in our package for demonstration purposes. You can ignore that entirely. Just say "fname = 'foobar.csv'" and have your own csv file called "foobar.csv" sitting in your current working dir

Re: [Matplotlib-users] Error when importing pyplot from matplotlib: »invalid literal for float(): 19#«

2015-08-10 Thread Benjamin Root
I don't know for certain, but perhaps the font-forge program has a repair utility? http://fontforge.github.io/en-US/ On Sat, Aug 8, 2015 at 5:51 AM, knight91 wrote: > Okay, is there a way to get an afm font file with a nicely formed header? > How > could I try to solve this problem? > > > Thomas

Re: [Matplotlib-users] [matplotlib-devel] IMPORTANT: Mailing lists are moving

2015-07-31 Thread Benjamin Root
nabble is also another fairly commonly used resource for viewing archived discussions. On Fri, Jul 31, 2015 at 2:14 PM, Jouni K. Seppänen wrote: > Neal Becker writes: > > > I read via gmane: I guess this will need to be updated? > > I attempted to send a message to gmane.discuss to request this

Re: [Matplotlib-users] Matplotlib differences MacOSXAgg and others

2015-07-15 Thread Benjamin Root
We have been recently fixing a bunch of issues in the macosx backend (which is default on Macs). Having the circle be dotted sounds exactly like the sort of problem that would be caused by some of the bugs we are addressing. I think we have some of the fixes committed to the master branch, so if yo

Re: [Matplotlib-users] Matplotlib 1.4.3 Agg problem

2015-07-15 Thread Benjamin Root
If your backend is set to Agg, then no interactive window will appear upon call to show(). Agg is intended for headless servers. What might be happening is that somewhere, you have Agg set as the default backend. Ben Root On Wed, Jul 15, 2015 at 10:16 AM, John Coppens wrote: > Hello all. > > I

Re: [Matplotlib-users] question on spherical coordinate plots

2015-07-10 Thread Benjamin Root
Your theta and phi were essentially 1D rather than 2D, so it didn't allow for 2 degrees of freedom. And you don't need np.outer() for this: theta = np.linspace(0, np.pi, 500)[:, None] phi = np.linspace(0, 2*np.pi, 500)[None, :] r = f(theta, phi) x = r**2 * np.cos(phi) * np.sin(theta) y = r**2

Re: [Matplotlib-users] Efficient matplotlib use on iOS and Android apps

2015-07-10 Thread Benjamin Root
The way matplotlib does its MathText rendering is 1) incomplete (we don't support all of MathTex), and 2) has *massive* overhead (relatively speaking). Matplotlib is intended for producing figures with many disparate components. The amount of code it takes to just generate a simple plot is fairly s

Re: [Matplotlib-users] background color of text plots as foreground

2015-07-09 Thread Benjamin Root
Which backend are you using? It works fine for me with a recent-ish master using Qt4Agg backend. Ben Root On Thu, Jul 9, 2015 at 6:52 AM, Mark Bakker wrote: > Hello list, > > I am trying to set the backgroundcolor of a textbox: > > from pylab import * > plot([1, 2, 3]) > text(1, 2, 'Hello', bac

Re: [Matplotlib-users] Efficient matplotlib use on iOS and Android apps

2015-07-09 Thread Benjamin Root
why not use MathJax? On Thu, Jul 9, 2015 at 8:03 AM, asiga wrote: > Hi, > > I need to render LaTeX math formulas on mobile apps (iOS/Android), with > high > quality, and as efficiently as possible. > > I'm considering matplotlib as the best candidate at the moment. Maybe it > might be a bit over

Re: [Matplotlib-users] Plot : Too many ticks on X axe

2015-07-08 Thread Benjamin Root
Your code example is incomplete. Even if I add in the typical imports and "fig, ax = plt.subplots()" and "plt.show()", The x tick labels aren't rotated, and I certainly don't have too many tick labels. Could you provide a complete working example that demonstrate the problem? Ben Root On Wed, Jul

Re: [Matplotlib-users] Zorder and Clip_on issues

2015-07-03 Thread Benjamin Root
Which version of matplotlib? This is familiar I could have sworn we fixed this. Ben Root On Jul 3, 2015 10:25 PM, "Gael Grissonnanche" wrote: > Hi everyone, > > > > I had recently experienced a frustration regarding zorder and clip_on in > Matplotlib. > > > > In figure 1 attached here, I wou

Re: [Matplotlib-users] Removing a shapefile after it is loaded

2015-07-01 Thread Benjamin Root
You would need to save the artist object that is returned by drawshapefile() in a list or something. Then, when you want to get rid of it. you can call its `remove()` method or just do a `set_visible(False)` to just hide it. This all requires having a reference to the artist object itself. Does th

Re: [Matplotlib-users] Multiple Projections On Same Axes

2015-06-30 Thread Benjamin Root
nds like I'll have to copy what those do, as I'm not planning on > working with Cartesian or even curvilinear coordinates. > > On Tue, Jun 30, 2015 at 11:36 AM, Benjamin Root wrote: > >> twinx()/twiny() I think is your best bet. It isn't a fully generic >> sol

Re: [Matplotlib-users] get_3d_properties

2015-06-30 Thread Benjamin Root
Yeah, this is a long-standing design issue: https://github.com/matplotlib/matplotlib/issues/1483 There are some changes that are happening that would make it possible for me to refactor mplot3d in a way that would make this feasible. I could bite the bullet and just provide a partial workaround to

Re: [Matplotlib-users] TypeError: Dimensions of C (645, 536) are incompatible with X (538) and/or Y (646); see help(pcolormesh)

2015-06-30 Thread Benjamin Root
It looks like your X data is one element larger than it needs to be. I know pcolor() accepts grids that are (N+1,M+1), and I *think* pcolormesh does the same. It will also accept grids that are (N,M) as well, but will drop the last row and collumn. Given your statement that it sometimes works, I s

Re: [Matplotlib-users] Multiple Projections On Same Axes

2015-06-30 Thread Benjamin Root
twinx()/twiny() I think is your best bet. It isn't a fully generic solution, but I think it addresses most needs. Ben Root On Mon, Jun 29, 2015 at 6:00 PM, T J wrote: > When I read the transformations documentation: > > > http://matplotlib.org/devel/add_new_projection.html#creating-a-new-projec

Re: [Matplotlib-users] Use _cntr.so in fortran?

2015-06-25 Thread Benjamin Root
_cntr.so has been deprecated (it might take a couple of releases before we remove it entirely). _contour.so has a newer, better interface and comes with a python wrapper. Don't know if that is an issue at all for you, just noting that is the case. I might also suggest looking at scikit-image, as

Re: [Matplotlib-users] zorder taking an array

2015-06-23 Thread Benjamin Root
,'d',markersize=52) > ax[0].set_xlim(-10.,10.) > ax[1].plot(x[[2,1,0]],y[[2,1,0]],'d',markersize=52) > ax[1].set_xlim(-10.,10.) > > > On Jun 23, 2015, at 9:44 AM, Benjamin Root wrote: > > I see what you are getting at. The issue is that artists are first so

Re: [Matplotlib-users] zorder taking an array

2015-06-23 Thread Benjamin Root
I see what you are getting at. The issue is that artists are first sorted by the zorder and then drawn one at a time. The draw for a collection artist is an at-once operation, it can't (currently) be split out and interspersed with the draws from another artist. This is one of the major limitations

Re: [Matplotlib-users] xticks not lining up with data

2015-06-17 Thread Benjamin Root
, Ted To wrote: > Unless I recall incorrectly, I think I am using set_xticklabels because > indices.index are strings. When I tried specifying > ax.plot(indices.index,indices.carli) I get a ValueError. > > Ted > > > On 2015-06-17 10:28 am, Benjamin Root wrote:

Re: [Matplotlib-users] xticks not lining up with data

2015-06-17 Thread Benjamin Root
Why are you calling ax.set_xticklabels()?. Why not pass the x values to ax.plot() along with the y values? Then you won't need to set the labels because matplotlib will do it for you. Ben Root On Wed, Jun 17, 2015 at 10:13 AM, Ted To wrote: > Hi, > > I'm having a strange problem and I don't und

Re: [Matplotlib-users] matplotlib documentation from python notebook?

2015-06-08 Thread Benjamin Root
No, there isn't an accepted way to do that AFAIK. However, it doesn't seem like it is all that far off. Our doc-build process will create the images from the examples automatically, so you don't need to include the image tag. It is sort of a way to make sure the examples work and that the image mat

Re: [Matplotlib-users] Basemap Problems

2015-06-08 Thread Benjamin Root
By the way, if you want quick-n-easy plotting of shapefiles, I suggest using GeoPandas, which makes it dead simple. On Mon, Jun 8, 2015 at 1:49 PM, Ronquillo, Edgar Nahum wrote: > Hello, > I am currently working with Basemap to plot a shapefile on the map. > However, I am confused on how to ini

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

2015-06-05 Thread Benjamin Root
Furthermore, I think there is some work being done to add functionality to the Norm to allow specifying a middle value along with a vmin and a vmax. Ben Root On Fri, Jun 5, 2015 at 3:20 PM, Eric Firing wrote: > On 2015/06/05 8:17 AM, Sourish Basu wrote: > > Very often the "zero" of an anomaly i

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

2015-06-05 Thread Benjamin Root
It is funny that you mention that you prefer the warmer colors over the cooler colors. There has been some back-n-forth about which is better. I personally have found myself adverse to using just cool or just warm colors, preferring a mix of cool and warm colors. Perhaps it is my background in mete

Re: [Matplotlib-users] Live Scrolling Matplotlib graph

2015-06-03 Thread Benjamin Root
The plot will autoscale base on the data that has been plotted to it. In your code, you are repeatedly calling plot(), albeit with a "scrolled" version of the data, but all of the previous calls to plot() are still visible. Also, no x-coordinate information is provided to the calls to plot(), so ea

Re: [Matplotlib-users] Annotate not Drawing Properly in a Gridspec - Version 1.4.3

2015-05-26 Thread Benjamin Root
I think this is a feature/bug that got reverted in the master branch. Perhaps you could try building matplotlib from source and seeing if the problem goes away? Cheers! Ben Root On Tue, May 26, 2015 at 3:00 PM, Sean Lake wrote: > Sterling, > > Thanks for the pointer. I've already used a workaro

Re: [Matplotlib-users] Plotting a imshow() image in 3d in matplotlib

2015-05-26 Thread Benjamin Root
On Tue, May 26, 2015 at 12:36 PM, Raj Kumar Manna wrote: > import matplotlib.pyplot as plt > from mpl_toolkits.mplot3d import Axes3D > import numpy as np > > # create a 21 x 21 vertex mesh > xx, yy = np.meshgrid(np.linspace(0,1,21), np.linspace(0,1,21)) > > # create vertices for a rotated mesh (3

Re: [Matplotlib-users] matplotlib.backends.backend_gtk3cairo memory leak

2015-05-26 Thread Benjamin Root
I take it that it doesn't happen using the GTK3Agg backend? What about the threading portion? Does it happen if you take the threading out? Ben Root On Tue, May 26, 2015 at 8:23 AM, David wrote: > Hi, I seem to have a memory leak while generating a 'live' plot display. > This wasn't the case fo

Re: [Matplotlib-users] Runtime Error on Solaris - Error Closing Dupe File Handle

2015-05-24 Thread Benjamin Root
Bryan, First off, avoid importing things from modules that start with an underscore. Because Python doesn't have semantics for public/private APIs like C++ and Java does, the underscore is treated as an indicator to developers that it is to be treated as private. The implication is that we are fre

Re: [Matplotlib-users] streamplot: vectors not pointing in the right direction!

2015-05-22 Thread Benjamin Root
The documentation for streamplot: ``` *x*, *y* : 1d arrays an *evenly spaced* grid. *u*, *v* : 2d arrays x and y-velocities. Number of rows should match length of y, and the number of columns should match x. ``` Note that the rows in *u* and *v*

Re: [Matplotlib-users] Fixing axes for imshow plot on top of a figure

2015-05-21 Thread Benjamin Root
I think you want figimage(): http://matplotlib.org/examples/pylab_examples/figimage_demo.html I use it all the time for adding the company's logo to graphs. Keep in mind that it will plot the unsampled version of the image, so the final result depends on the figure size and resolution. I hope tha

Re: [Matplotlib-users] How to plot a 2d streamline in 3d view in matplotlib

2015-05-21 Thread Benjamin Root
inx]*Uy[binz][binx] ) > logv[binz][binx] = log(speed[binz][binx]) > x,z=np.arange(xmin,xmax+dx,dx),np.arange(zmin,zmax+dz,dz) > y=np.arange(0,71,1) > X,Z=np.meshgrid(x,z) > > stream = ax.streamplot(X, Z, Ux, Uz, color='black', linewidth=2) > #lines = stream.lines.get_pa

Re: [Matplotlib-users] How to plot a 2d streamline in 3d view in matplotlib

2015-05-21 Thread Benjamin Root
t able to extract lines or > arrow from streamplot. I am new user of matplotlib, can you please tell me > the syntax to extract lines and arrows from streamplot(). > > Thanks for you help. > Raj > > On Thu, May 21, 2015 at 8:30 PM, Benjamin Root wrote: > >> Well, there

Re: [Matplotlib-users] How to plot a 2d streamline in 3d view in matplotlib

2015-05-21 Thread Benjamin Root
Well, there is the new 3D quiver feature: http://matplotlib.org/examples/mplot3d/quiver3d_demo.html. Not quite streamlines, but it might do in a pinch. Another approach: There is the 2d streamplot() function that returns a specialized object. >From the docstring: ``` Returns: *stream_

Re: [Matplotlib-users] plot problem

2015-05-18 Thread Benjamin Root
I noticed in your output that another figure seems to have been created (you see its output as ""). It would be useful to add some print statements to figure out exactly which line is emitting that. Second, you are calling "plt.savefig()" in the for-loop for the same filename. I suspect that isn't

Re: [Matplotlib-users] Good line plot color cycle for colorblind readers?

2015-05-15 Thread Benjamin Root
I am a huge fan of cycling line styles in conjunction with cycling colors in general. There is a cycler PR that achieves that goal fairly nicely: https://github.com/matplotlib/matplotlib/pull/4258 On Fri, May 15, 2015 at 5:59 PM, Eric Firing wrote: > On 2015/05/15 11:41 AM, Nathan Goldbaum wrote

Re: [Matplotlib-users] Basemap - UTM Support

2015-05-14 Thread Benjamin Root
Nick, Just to be clear, cartopy is intended to supersede basemap, but there are still many advantages at the moment to basemap over cartopy. The codebase is much more mature, and it is much easier to install than cartopy. I still regularly use basemap because I don't need the more advanced feature

Re: [Matplotlib-users] Cartopy install problem: this correct forum?

2015-05-13 Thread Benjamin Root
No, it isn't this list. I think it is the Iris list instead: https://groups.google.com/forum/#!forum/scitools-iris On Wed, May 13, 2015 at 1:06 PM, Nick Eubank wrote: > Not sure if this is the right forum; also posting to Stack Overflow ( > http://stackoverflow.com/questions/30221047/cartopy-con

Re: [Matplotlib-users] getting equation from a surface-fit model

2015-05-08 Thread Benjamin Root
This question would be much more suited for the scipy mailing list. On Fri, May 8, 2015 at 2:19 AM, diffracteD wrote: > Hi. > I have a data set like following: > x = [2.06, 2.07, 2.14, 2.09, 2.2, 2.05, 1.92, 2.06, 2.11, 2.07] > y = [171.82, 170.8, 159.59, 164.28, 169.98, 162.23, 167.37, 173.81

Re: [Matplotlib-users] bug in zorder example

2015-05-07 Thread Benjamin Root
But, why is it doing that only along the top edge and not the other edges (or are my eyes that bad)? On Thu, May 7, 2015 at 11:30 AM, Thomas Caswell wrote: > zorder can be negative, if you want to ensure that all of your lines are > always below all of the standard axis components simple decreas

Re: [Matplotlib-users] 2D data plotted in a 3D plot by adding time flow dimension

2015-05-07 Thread Benjamin Root
Looks like nabble swallowed your code snippet. Here it is: ``` import matplotlib.pyplot as plt import mpl_toolkits.mplot3d.axes3d as p3 import numpy.random as rnd import numpy as np TILL = 200 # just to have an end in the for loop def SSI(t): #Simulated Serial Input T = np.asarray(t)

Re: [Matplotlib-users] How to draw circles in logscale plots

2015-05-07 Thread Benjamin Root
A quick-n-dirty way would be to use markers via the scatter() function. Just set the facecolor to 'none', and some very large markersize value. Ben Root On Wed, Apr 8, 2015 at 12:49 PM, LowDepth wrote: > Hello, > > how can I plot circles or other shapes in plots which have logarithmic > axis? >

Re: [Matplotlib-users] bug in zorder example

2015-05-07 Thread Benjamin Root
you can always change the zorder of the frame using set_zorder(). Are you talking about the frame of the legend or the plotting area? On Mon, Apr 6, 2015 at 11:23 AM, plotter wrote: > The second example on > http://matplotlib.org/examples/pylab_examples/zorder_demo.html seems to > expose a bug,

Re: [Matplotlib-users] Axes3d.mouse_init(), facing problems when embedding matplotlib 3d-projection into PyQt5 App

2015-04-29 Thread Benjamin Root
o much that I dug into API again and searched for > mouse_init(). Taking the error message into account, "mouse rotation off" I > figured out that it's an axis problem. It's not the canvas which is > rotated, it's all about the axis, so I found the usage for t

Re: [Matplotlib-users] Axes3d.mouse_init(), facing problems when embedding matplotlib 3d-projection into PyQt5 App

2015-04-29 Thread Benjamin Root
g to consult your book, now, for different ways of coping with > such things... > > cheers, > Christian > > -- > "A little learning never caused anyone's head to explode!" > > > "Ein wenig Lernen hat noch niemandens Kopf zum Explodieren gebra

Re: [Matplotlib-users] Axes3d.mouse_init(), facing problems when embedding matplotlib 3d-projection into PyQt5 App

2015-04-28 Thread Benjamin Root
> > Thanks for the effort. > cheers, > Christian > > -- > "A little learning never caused anyone's head to explode!" > > > "Ein wenig Lernen hat noch niemandens Kopf zum Explodieren gebracht!" > > > > On Tuesday, April 28, 2015 7:3

Re: [Matplotlib-users] Axes3d.mouse_init(), facing problems when embedding matplotlib 3d-projection into PyQt5 App

2015-04-28 Thread Benjamin Root
-plotting lib which is > embedable. > > cheers, > Christain > -- > "A little learning never caused anyone's head to explode!" > > > "Ein wenig Lernen hat noch niemandens Kopf zum Explodieren gebracht!" > > > > On Tuesday, April 21, 2015 1:44 PM

Re: [Matplotlib-users] animation.FuncAnimation example --- how does it work?

2015-04-23 Thread Benjamin Root
ey, but I don't know how much it will cover of Animations. Sandro's book was released before the animation module was even a twinkle in Ryan May's eye... Cheers! Ben Root On Thu, Apr 23, 2015 at 1:40 PM, Virgil Stokes wrote: > On 23-Apr-2015 18:48, Benjamin Root wrote: >

Re: [Matplotlib-users] animation.FuncAnimation example --- how does it work?

2015-04-23 Thread Benjamin Root
Brendan, good catch, I didn't notice Virgil's confusion earlier. I think that is a good explanation. I remember getting very confused by all of that stuff back when I started in Python. I think mostly because I don't know of any other language that does argument handling like how Python does it. I

Re: [Matplotlib-users] animation.FuncAnimation example --- how does it work?

2015-04-23 Thread Benjamin Root
th an argument by FuncAnimation internally, but since animate() as defined by you did not have that argument, it fails. Cheers! Ben Root On Thu, Apr 23, 2015 at 12:32 PM, Virgil Stokes wrote: > On 23-Apr-2015 18:25, Benjamin Root wrote: > > The documentation should say "the num

Re: [Matplotlib-users] animation.FuncAnimation example --- how does it work?

2015-04-23 Thread Benjamin Root
The documentation should say "the number", not "a number". This particular argument expects either a generator, an iterable, or an integer. If none is given, it will try and figure out something for itself. The integer is used to create a number generator, and so you effectively have an iterable th

Re: [Matplotlib-users] Axes3d.mouse_init(), facing problems when embedding matplotlib 3d-projection into PyQt5 App

2015-04-21 Thread Benjamin Root
The addmpl() method isn't right. You created a canvas object, assigned it to self.canvas, but then tried to call FigureCanvas.__init__(), passing it whatever object "self" is. What class is addmpl() a part of? What does it subclass? On Tue, Apr 21, 2015 at 7:24 AM, Christian Ambros wrote: > Hi,

Re: [Matplotlib-users] Qt4 Designer Example

2015-04-16 Thread Benjamin Root
at there is interest. Ben Root On Wed, Apr 15, 2015 at 9:16 PM, Chris O'Halloran wrote: > On 16 April 2015 at 09:51, Benjamin Root wrote: > >> A little birdie has told me that someone else is writing a new >> comprehensive matplotlib book (I think it would replace Sandros'

Re: [Matplotlib-users] Some questions regarding pcolor(mesh)/nbagg/FuncAnimate

2015-04-16 Thread Benjamin Root
I just noticed your use of "animated=True". I have had trouble using that in the past with the animation module. It is a leftover from the days before the animation module and isn't actually used by it, IIRC. Try not supplying that argument. On Thu, Apr 16, 2015 at 8:18 AM, Ryan Nelson wrote: >

Re: [Matplotlib-users] Qt4 Designer Example

2015-04-15 Thread Benjamin Root
oks which have >> been published between 2013 and a really helpy book from March, 24th 2015 >> (yes, Benjamin Root wrote it), even they don't cover latest enhancements up >> to six month before print, (which might be seen a reasonable since changing >> is easy in a dig

Re: [Matplotlib-users] Qt4 Designer Example

2015-04-15 Thread Benjamin Root
te: > No offense, but it really is outdated. Consider that it'll take two years > to do the writing and the lecture work the research material is form 2007 > to 2008. We now are in 2015. As you can tell from other books which have > been published between 2013 and a really helpy book

Re: [Matplotlib-users] Some questions regarding pcolor(mesh)/nbagg/FuncAnimate

2015-04-13 Thread Benjamin Root
animation objects have a private _stop() method. That might have to be a workaround. On Sun, Apr 12, 2015 at 9:24 AM, Thomas Caswell wrote: > You can > > > ``` > > #import matplotlib > > #matplotlib.use('nbagg') > > #%matplotlib nbagg > > import numpy as np > > import matplotlib.pyplot as plt >

Re: [Matplotlib-users] Color Bar Limits

2015-04-02 Thread Benjamin Root
the first time through, noticing only the change to the vmin. Yeah, I think that would work just fine. Sorry for the confusion. Cheers! Ben Root On Thu, Apr 2, 2015 at 12:56 PM, Jody Klymak wrote: > > > On 2 Apr 2015, at 9:50 AM, Benjamin Root wrote: > > No, that's not what he

Re: [Matplotlib-users] Color Bar Limits

2015-04-02 Thread Benjamin Root
No, that's not what he is asking for. John wants the norm to go from -1 to 4, but he wants the colorbar to display only the 0 to 4 portion. Your approach (setting vmin=0) would change the normalization and change the colors. The axes limits do not appear to be scaled by the values. They are set to

Re: [Matplotlib-users] [matplotlib-devel] 1.4.3 does not build on Ubuntu 14 with python3

2015-04-01 Thread Benjamin Root
Didn't we fix that in trunk recently? On Wed, Apr 1, 2015 at 12:51 PM, Jens Nielsen wrote: > Looking more closely at this I think it is a bug on our side. When > freetype is not found it returns version as 'Failed to identify version.' > which > it tries to compare to a version number. The vers

Re: [Matplotlib-users] [matplotlib-devel] 1.4.3 does not build on Ubuntu 14 with python3

2015-04-01 Thread Benjamin Root
Yeah, that mirrors what others have stated. The common thread seems to be that all of these users were comfortable with doing "sudo pip install " (myself included). I was in a rush when I originally encountered issues back in the summer on my 12.04 machine, so I just switched to miniconda and didn'

Re: [Matplotlib-users] unsuscribe

2015-04-01 Thread Benjamin Root
You would need to go this link to unsubscribe: https://lists.sourceforge.net/lists/listinfo/matplotlib-users I don't think sourceforge does automated unsubscribes. On Wed, Apr 1, 2015 at 11:44 AM, AdolfoE Aguirre wrote: > unsuscribe > > > -

Re: [Matplotlib-users] [matplotlib-devel] 1.4.3 does not build on Ubuntu 14 with python3

2015-04-01 Thread Benjamin Root
andling the > 'not found' return code badly. This is coming up often enough we probably > do need to special case this check with a try/except. > > On Wed, Apr 1, 2015 at 9:50 AM Benjamin Root wrote: > >> Actually, look at the traceback... it is using distutils' v

Re: [Matplotlib-users] [matplotlib-devel] 1.4.3 does not build on Ubuntu 14 with python3

2015-04-01 Thread Benjamin Root
Actually, look at the traceback... it is using distutils' version.py. That's weird. Is that a result of setuptools monkey-patching? On Wed, Apr 1, 2015 at 9:25 AM, Jens Nielsen wrote: > I think we have seen this issue before and it seems to be caused by an out > of date version of setuptools. I

[Matplotlib-users] Interactive Applications using Matplotlib

2015-03-31 Thread Benjamin Root
The book I have been working on has now been published! It is about how to use most of the interactive features that comes with matplotlib in order to create your own GUI applications. The concepts are taught by building up a single application piece-by-piece, feature-by-feature. The final chapter

Re: [Matplotlib-users] Best way to display image from URL in Python3

2015-03-20 Thread Benjamin Root
According to the PR you reference, the fix for this was merged back in Jan 2013, so that means that this fix is in version 1.2.x and up. Are you saying that you still can't do imread(urllib.request.urlopen(url))? On Thu, Mar 19, 2015 at 8:54 PM, Ryan Nelson wrote: > Hello all, > > I'm porting ov

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

2015-03-19 Thread Benjamin Root
t. > > Now it works. > > Thanks > > Gabriele > > On Thu, Mar 19, 2015 at 1:19 PM, Benjamin Root wrote: > >> The warnings probably have nothing to do with the issue at hand. Try >> this. Install the package "faulthandler" and add the appropriate lines

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

2015-03-19 Thread Benjamin Root
The warnings probably have nothing to do with the issue at hand. Try this. Install the package "faulthandler" and add the appropriate lines to your Bdipoly.py script and run it again. That way, we can get a traceback and find out where it is segfaulting from. http://faulthandler.readthedocs.org/en

  1   2   3   4   5   6   7   8   9   10   >