Re: [Matplotlib-users] Crash when using matplotlib.tri.LinearTriInterpolator

2014-08-11 Thread Dale Chayes
Runs to completion without errors on my installation:

OS X  10.9.4
MacBook Air w/ 8GB of memory
Python 2.7 and matplotlib 1.3.1-1  lib 

-Dale


On Aug 10, 2014, at 13:43 , Hartmut Kaiser  wrote:

> All,
> 
> I'm running into a crash while trying to construct a
> tri.LinearTriInterpolator. Here is the short version of the code:
> 
>import netCDF4
>import matplotlib.tri as tri
> 
>var = netCDF4.Dataset('filename.cdf').variables
>x = var['x'][:]
>y = var['y'][:]
>data = var['attrname'][:] 
>elems = var['element'][:,:]-1
> 
>triang = tri.Triangulation(x, y, triangles=elems)
> 
># this crashes the python interpreter
>interp = tri.LinearTriInterpolator(triang, data)
> 
> The data arrays (x, y, data, elems) are fairly large (>1 mio elements), all
> represented as numpy arrays (as returned by netCDF4). The 'data' array is a
> masked array and contains masked values.
> 
> If somebody cares, I'd be able to post a link to the netCDF data file
> causing this.
> 
> All this happens when using matplotlib 1.3.1, Win32, Python 2.7.
> 
> Any help would be highly appreciated!
> Regards Hartmut
> ---
> http://boost-spirit.com
> http://stellar.cct.lsu.edu
> 
> 
> 
> --
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting with more than two y-axes (with twinx?)

2013-11-27 Thread Dale Chayes

On Nov 27, 2013, at 18:38 , Joe Kington  wrote:

> Hi Daniel,
> 
> For what it's worth, the code runs perfectly for me as-is on matplotlib 1.3.1 
> with python 2.7 on linux.

Same here for what its' worth:
OS X 10.9
python2.7   from Fink
matplotlib-py27 1.3.0-1  from Fink

-Dale

> 
> However, based on your description, I'd guess that the second call to `twinx` 
> is returning the same axes object.
> 
> What happens when you do:
> 
> print id(axes[1]), id(axes[2])
> 
> Are the id numbers the same or different?  
> 
> If they're the same, there may have been a regression/change that causes 
> `twinx` to return the same object instead of creating a new axes.
> 
> Cheers!
> -Joe
> 
> 
> 
> On Wed, Nov 27, 2013 at 5:08 PM, dodermat  wrote:
> Dear all
> 
> What I want to accomplish was produced two years ago in  a stackoverflow
> snippet by Joe Kington
> 
> , 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 replaces the second
> axis, and the blue dots are accordingly distributed in only the lower half
> of the plot (see second figure below). I considered downdating to an older
> version of matplotlib, but then I came across  a remark in the matplotlib
> FAQ   .
> According to this remark, such a feature for twinx is on the wish list and
> thus not very likely to be available in an older version.
> 
> Can someone please explain the Kington magic to me?
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://matplotlib.1069221.n5.nabble.com/Plotting-with-more-than-two-y-axes-with-twinx-tp42556.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
> 
> --
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> --
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] zoomed in detail box

2012-09-12 Thread Dale Chayes
[replying only to the list -Dale]

On Sep 12, 2012, at 07:02 , Jae-Joon Lee wrote:

> Your code works as expected in my side.

I wasn't quite sure what to expect, but based on Jae-Joon's note:

> So, changing (0.5, 0.5) to something like  (0.6, 0.5) has no effect in
> your side?

It seems to work on my installation. I actually changed to (0.3,0.5) which made 
a nice view.
 
> Hmm, what is you matplotlib version?

OS X 10.7.4 using python and tools from fink: 
i   python27 1:2.7.3-1
i   python27-shlibs  1:2.7.3-1
i   matplotlib-basemap-py27  1.0.2-1
i   matplotlib-py27  1.1.1-1
i   numpy-py27   1.6.1-1

Thanks to the folks who make this work,
-Dale


> Maybe this is a bug in old version of matplotlib.
> 
> Regards,
> 
> -JJ
> 
> 
> On Wed, Sep 12, 2012 at 6:16 PM, darkside  wrote:
>> Thank you for your help.
>> 
>> A simple example that doesn't work for me is:
>> 
>> import pylab as p
>> import numpy as np
>> from mpl_toolkits.axes_grid.inset_locator import zoomed_inset_axes
>> from mpl_toolkits.axes_grid.inset_locator import mark_inset
>> from mpl_toolkits.axes_grid.anchored_artists import AnchoredSizeBar
>> from matplotlib.ticker import MaxNLocator
>> 
>> fig = p.figure(figsize=(12,8))
>> ax = p.subplot(111)
>> 
>> z = p.arange(0,1.415,0.01)
>> d = z**2+np.random.random(len(z))
>> 
>> ax.plot(z,d,'ro',label='text')
>> 
>> p.xlabel('z',fontsize=18)
>> p.ylabel('Luminosity distance',fontsize=18)
>> p.grid(True)
>> 
>> axins = zoomed_inset_axes(ax,
>> 3,bbox_to_anchor=(0.5,0.5),bbox_transform=ax.figure.transFigure, loc=2)
>> 
>> 
>> axins.plot(z,d,'r.')
>> 
>> ax.legend(loc=2,bbox_to_anchor=(1,1))
>> 
>> x,y = (0.86,1.3)
>> x2,y2 = (1,1.7)
>> axins.set_xlim(x,x2)
>> axins.set_ylim(y,y2)
>> axins.tick_params(axis='both',labelsize=12)
>> axins.xaxis.set_major_locator(MaxNLocator(2))
>> axins.yaxis.set_major_locator(MaxNLocator(3))
>> 
>> mark_inset(ax,axins,loc1=1,loc2=3, fc="none", ec="0.5")
>> 
>> p.draw()
>> p.show()
>> ---
>> The "bbox_to_anchor" label is supposed to move the zoomed axis, but it does
>> nothing, no matter what two numbers I place there.
>> I guess that I miss something, but I can't figure out what. I really
>> appreciate your help.
>> 
>> Best regards,
>> Illa
>> 
>> 
>> 
>> 2012/9/5 Jae-Joon Lee 
>>> 
>>> On Mon, Aug 20, 2012 at 10:50 PM, darkside 
>>> wrote:
 I am using zoomed_inset_axes, but the default position overlaps the
 yticks
 and the parent axe ticks, so I am trying:
 axins = zoomed_inset_axes(ax,
 3,bbox_to_anchor(0.5,1),bbox_transform=ax.figure.transFigure, loc=2)
>>> 
>>> This is supposed to work, and my quick test did work. Can you post a
>>> complete but simple exampl?
>>> 
>>> Regards,
>>> 
>>> -JJ
>> 
>> 
> 
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] pdf/eps export; dotted line plot shows random markers on the line

2012-06-09 Thread Dale Chayes
No extra "stuff" in the png and pdf plots in my case (changed the hash-bang 
line):

Mac  10.7.4 w/  python and matplotlib from (not too recent) Fink:
 i   python27 1:2.7.2-5Interpreted, object-oriented language
 i   python27-shlibs  1:2.7.2-5Interpreted, object-oriented language
 i   matplotlib-base  1.0.2-1  Plot data on map projections with matplotlib
 i   matplotlib-py27  1.1.0-2  Pure python 2D plotting with a Matlab syntax

-Dale



On Jun 9, 2012, at 13:00 , Benjamin Jonen wrote:

> Hey everybody,
> 
> I am trying to create a simple plot with a dotted line. However,
> depending on the export format I use, I get random markers on the
> line. This effect appears for pdf but not for png. When I use eps and
> convert the eps file to pdf I also receive the random markers.
> 
> I use the following script to generate the plot. The resulting graph
> on my system is attached to this mail.
> 
> #!/usr/bin/env python
> import numpy as np
> a = np.linspace(0.,10.,100)
> b = np.sqrt(a)
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pyplot as plt
> fig = plt.figure()
> ax = fig.add_subplot(111)
> fig.add_subplot(ax)
> ax.plot(a, b, linestyle = ':', color = 'k', linewidth = 3)
> fig.savefig('broken.pdf')
> 
> My system is:
> 
> Linux  3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012
> x86_64 x86_64 x86_64 GNU/Linux
> 
> I am using matplotlib version '1.1.0'.
> 
> Any help is greatly appreciated.
> Benjamin
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. 
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] use the github version on a linux box

2012-02-08 Thread Dale Chayes
I interpreted the "public key" error (as did others) to be an ssh issue.  For a 
publicly readable approach this seems to work:

[dhcp-90-166:python/matplotlib/git] dale% git clone 
git://github.com/matplotlib/matplotlib.git
Cloning into matplotlib...
remote: Counting objects: 57725, done.
remote: Compressing objects: 100% (13597/13597), done.
remote: Total 57725 (delta 44284), reused 57317 (delta 43924)
Receiving objects: 100% (57725/57725), 81.69 MiB | 2.67 MiB/s, done.
Resolving deltas: 100% (44284/44284), done.
[dhcp-90-166:python/matplotlib/git] dale% ll
total 0
drwxr-xr-x   3 dale  staff   102 Feb  8 13:20 .
drwxr-xr-x   5 dale  staff   170 Feb  8 13:08 ..
drwxr-xr-x  33 dale  staff  1122 Feb  8 13:21 matplotlib
[dhcp-90-166:python/matplotlib/git] dale% 

-Dale



On Feb 8, 2012, at 13:13 , John Hunter wrote:

> 
> 
> On Wed, Feb 8, 2012 at 12:06 PM, Tony Yu  wrote:
> 
> git clone g...@github.com:matplotlib/matplotlib.git matplotlib.git
> 
> did not go through.
> 
> - Chris
> 
> 
> I don't think you want the ".git" at the very end of the clone command. That 
> just tells get where (i.e. new directory) to put the repo.
> 
> 
> I don't think that is the problem.  I just add the .git extension because the 
> default is to check out a directory called "matplotlib" which if it is 
> located in the path you are running or testing from, will confuse the import. 
>  So I just add some extension so python won't confuse the mpl src dir 
> ("matplotlib.git") with the mpl package ("matplotlib").
> --
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Page not available on server

2011-11-24 Thread Dale Chayes

On Nov 23, 2011, at 7:58 , Sven Ahrens wrote:

> Dear mailinglist readers,
> 
> I have a problem by accessing the content
> 
> http://matplotlib.sourceforge.net/examples/pylab_examples/demo_tight_layout_00.html

This one works:

http://matplotlib.sourceforge.net/examples/pylab_examples/demo_tight_layout.html

I'm wondering where the "_00" came from in your link?

-Dale

> 
> whereas other contents, like for example
> 
> http://matplotlib.sourceforge.net/examples/pylab_examples/demo_ribbon_box.html
> 
> are well accessible. Is there a reason, why this content is not available?
> 
> I would be glad, if you might help.
> 
> Best regards,
> Sven Ahrens
> 
> 
> The error message:
> 
> An error has been encountered in accessing this page.
> 1. Server: matplotlib.sourceforge.net 
> 2. URL path: /examples/pylab_examples/demo_tight_layout_00.html 
> 3. Error notes: NONE 
> 4. Error type: 404 
> 5. Request method: GET 
> 6. Request query string: NONE 
> 7. Time: 2011-11-23 12:45:59 UTC (1322052359)
> 
> 
> --
> All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application performance, 
> security threats, fraudulent activity, and more. Splunk takes this 
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Loading txt files

2011-11-01 Thread Dale Chayes
Attached is a very simple version.
It assumes your sample data is in a file.

The first line is "magic" and makes significant assumptions about where python 
is installed on your system. This may or may not be the right answer for your 
system.

Plotting requires matplotlib which you may need to install.



#!/sw/bin/python

import numpy
import matplotlib.pyplot as plt

dataset = numpy.genfromtxt(fname='readata.txt',skip_header=1)

print dataset

x=dataset[:,0]
y=dataset[:,1]

plt.figure(1)
plt.plot(x,y)
plt.plot(x,y,'ro')
plt.show()
--


On Nov 1, 2011, at 9:29 , yelena wrote:

> 
> I have numpy.
> I need the body of a program, which plots y dependence of x.
> 
> Maybe than I'll figure out how does it works...
> 
> 
> Daniel Hyams wrote:
>> 
>> One quick way of doing this is to use numpy:
>> 
>> import numpy
>> 
>> dataset = numpy.genfromtxt(fname='yourfilename',skip_header=1)
>> 
>> http://docs.scipy.org/doc/numpy/reference/generated/numpy.genfromtxt.html
>> 
>> On Tue, Nov 1, 2011 at 8:50 AM, yelena  wrote:
>>> 
>>> Hi!
>>> I'm new at Matplotlib, so I need a little help.
>>> I was trying to load data from txt files with no luck.
>>> I have 2 collumns in txt files and I need to plot a XY graph. Should I
>>> modify txt file to other format?
>>> 
>>> Can someone give me a simple example for doing this?
>>> 
>>> In txt file could be such information:
>>> Meters   Seconds
>>> 14
>>> 28
>>> 312
>>> 416
>>> 520
>>> 
>>> Thanks in advance!
>>> 
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Loading-txt-files-tp32758393p32758393.html
>>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>> 
>>> 
>>> --
>>> RSA® Conference 2012
>>> Save $700 by Nov 18
>>> Register now
>>> http://p.sf.net/sfu/rsa-sfdev2dev1
>>> ___
>>> Matplotlib-users mailing list
>>> Matplotlib-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>> 
>> 
>> 
>> 
>> -- 
>> Daniel Hyams
>> dhy...@gmail.com
>> 
>> --
>> RSA® Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
>> 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Loading-txt-files-tp32758393p32758620.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
> 
> 
> --
> RSA® Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
RSA® Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users