Isn't that what
quiverhttp://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.quiverdoes?
Or am I misunderstanding the question?
2010/5/3 aditya bhargava bluemangrou...@gmail.com
Thanks Johan and Matthias,
I was just wondering if there was a built-in way to do this in
One workaround is to try converting it to a PIL image first.
For whatever reason, imshow chokes on large arrays, but handles PIL images
of the same array just fine.
However, you'll need to set the colormap and such through PIL, which can be
a bit frustrating if you're unfamiliar with it. Also,
There's no single function to do it, but just reversing the current ylimits
manually is a one-liner. (plt is matplotlib.pyplot, here)
plt.ylim(plt.ylim()[::-1])
Hope that helps,
-Joe
On Fri, Jun 25, 2010 at 6:41 AM, Preben Randhol rand...@pvv.org wrote:
Hi
I need to plot some data vs
If you just need the GSHHS data in shapefile format, it's available on the NOAA
GSHHS website http://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html.
If you prefer a direct link [96MB zip file]:
http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version2.0/shapefiles/gshhs_shp_2.0.zip
Hope that
Ah, sorry I misunderstood.
You can get them by using GMT's gshhs tool (or just using pscoast with the
right options) to dump out the political borders in GMT format and then
convert them to a shapefile using ogr2org (or whichever tool you find
easiest... Personally I use the python wrappers
It sounds like you're wanting a gaussian kernel density estimate (KDE) (not
the desktop!). The other options you mentioned are for interpolation, and
are not at all what you're wanting to do.
You can use
On Tue, Jul 27, 2010 at 1:37 PM, Friedrich Romstedt
friedrichromst...@gmail.com wrote:
2010/7/26 Mathew Yeates mat.yea...@gmail.com:
Is there a simple function call for this? And finding the distance of
a point to the plane?
Hmm, when you are interested in the z distance alone, it should
Hi,
I've recently noticed that setting the y-tick locations on an image plot
changes the y-axis limits, while changing the x-tick locations does not
change the x-axis limits. I wouldn't have expected either to change the
axis limits, but it seems quite inconsistent that the y-axis and x-axis
Thanks for the amazingly quick turnaround!
-Joe
On Sat, Aug 21, 2010 at 1:34 PM, Eric Firing efir...@hawaii.edu wrote:
On 08/20/2010 12:18 PM, Joe Kington wrote:
Hi,
I've recently noticed that setting the y-tick locations on an image plot
changes the y-axis limits, while changing the x
On Sun, Sep 19, 2010 at 10:40 PM, Kelson Zawack zawack...@gis.a-star.edu.sg
wrote:
Is there a way to put the legend for a graph inside the margin instead
of on the graph, in other words to put the legend where excel would?
Look into either
Have a look at fill_between:
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.fill_between
Basically, You'd want something like this:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, np.pi, 20)
y = np.sin(x)
plt.figure()
plt.fill_between(x, y,
If you're just looking for the dimensions of the overall figure in pixels,
you can easily access them through other means. E.g:
import matplotlib.pyplot as plt
fig = plt.figure()
_, _, width, height = fig.bbox.extents # - Extent of the figure in pixels
fig.savefig('temp.png', dpi=fig.dpi) # - Be
Hi folks,
First off, I apologize for the wall of text...
Spurred on by this Stack Overflow
questionhttp://stackoverflow.com/questions/4018860/text-box-in-matplotlib/4056853#4056853,
and by an itch I've been wanting to scratch lately, I put together a a
callback function that (attempts, anyway)
For whatever it's worth, after a lot of wrangling, I think I solved most of
my problems (though perhaps not in the most efficient way).
In case anyone else is looking for similar functionality, here's a callback
function that will autowrap text objects to the inside of the axis they're
plotted
Actually, I think he's wanting a set aspect, right? Either way, it's just
aspect=1.5 or aspect=0.6667 depending on the orientation he wants.
On Mon, Apr 18, 2011 at 6:37 AM, Sebastian Berg
sebast...@sipsolutions.netwrote:
The solution is already the aspect='auto', ie:
import numpy as np
Thanks!
-Joe
On Sun, May 15, 2011 at 12:50 AM, Eric Firing efir...@hawaii.edu wrote:
On 05/14/2011 12:22 PM, Joe Kington wrote:
Hi,
When getting an axis's extents through axis, the autoscaling state of
the axis is turned off, regardless of the state it was in before calling
ax.axis
Your code should work (and does on my system)...
What backend, version of matplotlib, OS, etc are you running?
On Sat, Jun 4, 2011 at 4:54 PM, Armin G armi...@gmail.com wrote:
Hi everyone ,
I know this has been posted several times now, But I could not understand
qietly why my simple code
. The axes are still not disappearing, nor do
they disappear when I interact with it (by rotating the plot).
-- Matt
On Wed, Sep 7, 2011 at 3:21 PM, Benjamin Root ben.r...@ou.edu wrote:
On Wed, Sep 7, 2011 at 2:14 PM, Joe Kington jking...@wisc.edu wrote:
This no longer seems to work
The link on Nabble is broken, so here's (I think) a fixed version. It looks
like the name of the branch was changed slightly at some point.
https://github.com/kdavies4/matplotlib/compare/master...ternary2
Cheers,
-Joe
On Thu, Nov 3, 2011 at 3:14 PM, Benjamin Root ben.r...@ou.edu wrote:
On
On Wed, Nov 9, 2011 at 10:07 AM, Howard how...@renci.org wrote:
Hi all
I'm a new user to matplotlib, and I'm having a little difficulty with
something I feel must be basic. When I plot our data, I'm using a canvas
that is 4x4 at 128 DPI and saving the canvas as a png. Here's the basics
of
On Wed, Nov 9, 2011 at 10:20 AM, Howard how...@renci.org wrote:
On 11/9/11 11:13 AM, Joe Kington wrote:
On Wed, Nov 9, 2011 at 10:07 AM, Howard how...@renci.org wrote:
Hi all
I'm a new user to matplotlib, and I'm having a little difficulty with
something I feel must be basic. When I
On Wed, Nov 9, 2011 at 11:45 PM, Gökhan Sever gokhanse...@gmail.com wrote:
Hello,
Is there any easy way to specify a time-axis using imshow to plot 2D data?
Sure, just call ax.xaxis_date() (or yaxis_date, depending on which axis
you want to represent a date).
As a quick example:
import
(SecondLocator(interval=5))
gives me better control over the major/minor ticks.
On Thu, Nov 10, 2011 at 8:15 AM, Joe Kington jking...@wisc.edu wrote:
On Wed, Nov 9, 2011 at 11:45 PM, Gökhan Sever gokhanse...@gmail.comwrote:
Hello,
Is there any easy way to specify a time-axis using imshow to plot
It sounds like you were using the right approach, you just got a bit lost
on what some of the keyword parameters to annotate, etc do.
Here's an example that should do what you want:
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
fig, ax = plt.subplots()
# Set the
- Geometric analysis utilities (e.g. plane intersections)
Thank you all very much!
-Joe Kington
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has
That's what ``scatter`` is intended for.
Basically, you want something like:
plt.scatter(x, y, c=z, marker='s')
plt.colorbar()
Note that you can also vary the markers by size based on an additional
parameter, as well.
Have a look at this example:
changes,
but this one must have slipped the net.
If you're still having problems with using the newer transform API, please
shout and I'd be happy to have a look for you.
Will do, thanks for the offer!
All the best,
Phil
On 9 December 2012 22:10, Joe Kington joferking...@gmail.com wrote
I recently got around to polishing up a snippet I've been using for quite
awhile. https://github.com/joferkington/mpldatacursor/ and I was hoping
to get some feeding on the current implementation.
mpldatacursor allows a user to easily click on an artist and display a
customizable, interactive
by setting its edgecolor to 'None'.
This was because the contour created had two parts and I only wanted to
show one of them. Anyone know a different way to do that?
Regards,
Jon
On Tue, 2013-03-12 at 22:58 -0500, Joe Kington wrote:
I recently got around to polishing up a snippet I've
On Mar 15, 2013 10:01 AM, Christophe BAL projet...@gmail.com wrote:
Hello,
I really appreciate the work done by matplotlib but I really think that
the interface must evolve. Here is a small example.
object.set_something(...)
object.get_something()
It could be easier to use a
Apart from implementing this natively in matplotlib, I was thinking if
I could work around this limitation for our purposes in the following
way: My objects to draw will always sit in a Collection. I could derive
my own Collection class with a draw() method that changes the
linewidth of the
For anyone attending the AGU (American Geophysical Union) fall meeting this
year, there will be a session on python and big data in the earth
sciences. Abstract submission is still open until Aug. 6th. See below for
more info.
Cheers,
-Joe
-- Forwarded message --
From: IRIS
snip
Unfortunately, figaspect is only an approximate solution, as it simply
uses the aspect ration of the image for the whole figure (with axes and
labels).
I wonder how difficult it would be to teach matplotlib to tightly fit
the axes around an image, and, ideally, output the figure
I just realized that I replied to this off-list. Sending back out to the
entire list. (Sorry for the duplicate e-mail Christoph!)
On Oct 18, 2013 6:11 AM, Christoph Groth christ...@grothesque.org wrote:
Joe, thank you very much for your reply. So the figsize of a
matplotlib plot is the
If you're asking how to do it interactively, just click on the zoom button
again, and you should be able to fire pick events by clicking again.
Hope that helps!
-Joe
On Oct 29, 2013 4:58 AM, Nils Wagner nils...@googlemail.com wrote:
Hi all,
How can I use a pick event when I have used Zoom to
On Oct 30, 2013 9:43 AM, Nils Wagner nils...@googlemail.com wrote:
Hi all,
How can I retrieve the corresponding color value in percent, when I
click on the image ?
You have to jump through a couple of hoops.
Have a look at the _coords2index function in pick_info.py for
mpldatacursor.
installed your package mpldatacursor and run the example
image_example.py.
Awesome !
Is there a chance to integrate it into matplotlib ?
Nils
On Wed, Oct 30, 2013 at 5:58 PM, Joe Kington joferking...@gmail.comwrote:
On Oct 30, 2013 9:43 AM, Nils Wagner nils...@googlemail.com wrote:
Hi all
strange that
the FSF is using a license other than the (L)GPL. Does it also mean
that who wants to contribute to your project must sign a copyright
assignment to the FSF?
I'm puzzled.
Best,
Daniele
On 30/10/2013 17:58, Joe Kington wrote:
On Oct 30, 2013 9:43 AM, Nils Wagner nils
Sourav - Are you by chance trying to make a stereonet? If so, your
question makes a bit more sense. If that's what you're doing, have a look
at mplstereonet. https://github.com/joferkington/mplstereonet It currently
doesn't support polar stereonets, but that's something I've been meaning to
add
Until very
recentlyhttp://stackoverflow.com/questions/20069545/2d-plotting-with-colors-like-spectrograms-magnitude-plots#comment29914445_20069545,
I had somehow wound up with the impression that `pcolormesh` only handles
rectilinear coordinate arrays, while `pcolor` can handle arbitrarily shaped
to accomplish was produced two years ago in a stackoverflow
snippet by Joe Kington
http://stackoverflow.com/questions/7733693/matplotlib-overlay-plots-with-different-scales
, and shown in the first figure below. However, when I use his snippet in
matplotlib 1.3.x, I get an output where the third axis
On Tue, Jan 7, 2014 at 2:29 PM, Adam Hughes hughesada...@gmail.com wrote:
Sorry, quick followup. I did find the gallery example to plot multiple
patches together:
http://matplotlib.org/examples/api/patch_collection.html
That's excellent. Now I guess my question is how best to generalize
There's a bad meme here. Hope you'll forgive the distraction!
import matplotlib.pyplot as plt
import numpy as np
def main():
t = np.linspace(0, 4*np.pi, 1000)
fig, ax = plt.subplots()
ax.plot(t, np.cos(t))
ax.plot(t, np.sin(t))
for _ in range(10):
fig =
On Mar 10, 2014 1:00 PM, Gabriele Brambilla
gb.gabrielebrambi...@gmail.com wrote:
And how can I select in which position of the grid of plots put my
errorbar plot?
like axes[i].errorbar(...)?
Exactly. Except that axes will be a 2d array if you have multiple rows and
columns, so it would be
That should be `matplotlib.use('TkAgg')`, not Agg. Agg is a
non-interactive backend, while TkAgg is an interactive Tkinter wrapper
around the Agg backend.
On Thu, Mar 13, 2014 at 9:53 AM, Jeroen Hegeman jeroen.hege...@gmail.comwrote:
Hi Christophe,
This is (I think) a known limitation of the
I think the OP's desire is to have pick events fire after the zoom has been
triggered.
Currently, after you zoom (or pan), the zoom tool is still active until you
click it again. Pick events won't fire while the zoom tool is the selected
tool, and you have to manually de-select it (i.e. click
Why not just use boolean indexing?
E.g. to find the region that falls between 5 and 10, do (z =5) (z =
10):
In [1]: import numpy as np
In [2]: x, y = np.mgrid[-10:10, -10:10]
In [3]: z = np.hypot(x, y)
In [4]: result = (z = 5) (z = 10)
In [5]: result.astype(int)
Out[5]:
array([[0, 0, 0, 0,
A quick way to do this is ``ax.invert_yaxis()`` (and invert_xaxis() for
the x-axis). That way you preserve auto-scaling and don't wind up with
manually set axis limits.
What you did should have worked, but ``ymin`` and ``ymax`` are probably
datetime objects. ``ylim`` isn't smart enough to
I agree that it would be useful, but basemap doesn't support EPSG codes, so
this isn't fully possible in general.
On a side note, if you're ever just wanting to transform coordinates,
pyproj supports generic proj4 strings. (e.g. proj =
pyproj.Proj(your_proj4_string))
It might be possible to
On Fri, Nov 21, 2014 at 10:42 AM, Pedro Marcal pedrovmar...@gmail.com
wrote:
@MariaLukis, I had to go through contortions to plot an arbitrary
quadrilateral mesh, in 3D. I resolved it by storing every line plotted and
retracing the best set to take me to the starting point of the quad I was
Nbagg is non-interactive, similar to Agg. No events other than draw events
are supported, as far as I know.
I think there are long term plans to change that (eg, webagg and
mplh5canvas), but it's a fairly tricky problem.
How that helps clarify why things aren't working, anyway.
-Joe
On Dec 4,
reply to e-mail without putting much thought
into it.
Thanks!
-Joe
On Thu, Dec 4, 2014 at 8:58 PM, Brendan Barnwell brenb...@brenbarn.net
wrote:
On 2014-12-04 15:40, Joe Kington wrote:
Nbagg is non-interactive, similar to Agg. No events other than draw
events
are supported, as far as I
On Fri, Jun 5, 2015 at 11:15 AM, Joe Kington joferking...@gmail.com wrote:
Hopefully I will have some time today to play around with the D option. I
want to see if I can shift the curve a bit to include more yellows and
orange so that it can have a mix of cool and warm colors.
I
Not to plug one of my own answers to much, but here's a basic example.
http://stackoverflow.com/questions/20144529/shifted-colorbar-matplotlib
I've been meeting to submit a PR with a more full featured version for a
few years now, but haven't.
On Jun 5, 2015 4:45 PM, Sourish Basu
I think you're asking how to blend a custom intensity image with an rgb
image. (I'm traveling and just have my phone, so you'll have to excuse my
lack of examples.)
There are several ways to do this. Basically, it's analogous to blend
modes in Photoshop etc.
Have a look at the
Well, if Freetype were only distributed under the GPL, you couldn't
distribute matplotlib in binary form without providing the source code.
However, Freetype is distributed under more than one license. (see:
https://www.freetype.org/license.html )
Because it's distributed under a BSD-style
56 matches
Mail list logo