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

2015-08-14 Thread Kevin Parks
That does help. But then that means I need to reformat my data somehow? I want 
it so that each “voice” is plotted separately as a unique color and my legend 
would be 

Voice 1 -
Voice 2 -
Voice 3 -
Voice 4 -

Just as if I had the temperature for four different days plotted.

confused




 On Aug 15, 2015, at 2:14 AM, Benjamin Root ben.r...@ou.edu wrote:
 
 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 
 directory. plotfile() works by reading in a CSV file and plotting the 
 columns given. So, the CSV file will need in its first line those column 
 headers. The first one given will be for the x-axis, while the rest are for 
 the individual lines.
 
 Does that help?
 Ben Root
 


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Plotting from a data file

2015-08-14 Thread Kevin Parks
I am a very lost gnuplot.py refugee. I hung in there as long as I could but 
sadly, gnuplotpy does not run on my machine so I managed, somehow to install 
new pythons, matplotlib, numpy, etc. and am up and running. Actually now trying 
out Canopy, which was even easier than running from the shell on OS X.

I am trying to plot some data by looking through the examples, finding 
something close to what I need and modifying it to work for the data I want to 
plot but I am lost and overwhelmed. Any pointers at all would be greatly 
appreciated. What I want to do surely is easy but I am really new at this and 
have been away from python a long time. I am reading the docs as fast as I can.

The task at hand:

I have 4 lines that I want to plot on top of each other (different colors) and 
the data, rather than being generated with an algorithm in python would be read 
in from a file.

A plot that looks close is #5 from plotfile_demo.py (seen here: 
http://matplotlib.org/mpl_examples/pylab_examples/plotfile_demo_04.png 
http://matplotlib.org/mpl_examples/pylab_examples/plotfile_demo_04.png)

but that is confusing as it seems to open some file that I can’t seem to find 
in my install called 'msft.csv' and I am not sure the way it is doing the plot 
is all that customizable as the code for it is tiny and the routine it calls 
seems to do a lot of formatting automatically.

The easiest way to explain what need to do is to give a simplified task that is 
analogous, such as plot 4 individual simultaneous lines to show how they 
overlap and intersect and also their global motion, much like showing, say, the 
movement and relationship of distinct musical lines in an 4 voice choir(SATB) 
piece (that isn’t what I am doing but it is darned close).

In short I want to have a data file that has:

event_start_time, event_duration, frequency_value(for now midi will do), voice 
(perhaps specified with a number like: 1=soprano, 2=alto, 3=tenor, 4=bass each 
voice in a different color)

So the data would like so (quick  totally random at the moment):

0.0, 2.5, 60, 1 
2.0, 1.5, 62, 4 
4.0, 5.0, 64, 2 
6.0, 3.5, 65, 3 
8.0, 1.5, 67, 1 
10.0, 2.0, 69, 4 
12.0, 5.5, 71, 3 
14.0, 3.0, 70, 2 
16.0, 2.0, 72, 1 
18.0, 1.0, 74, 4 
20.0, 0.5, 75, 3 
22.0, 1.5, 77, 2 
24.0, 0.5, 79, 1 

The legend just like in the above example and the x axis would be time and y 
axis frequency. Then I would have to figure out tic values and all that. I have 
been away from the whole world of python for a long while but I used to do this 
with great easy and flexibility in gnuplot.py even if the graphs did not look 
as lovely as these matlabplotlib ones do but this package is really new to me 
and I am somewhat overwhelmed by the enormity of matlabplotlib. Very sorry for 
such a newbie query but I feel like if i could get this going I would at least 
know which aspects of the package I need to read up on.










--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2015-08-14 Thread Kevin Parks
Hi,

That doesn’t work. Just having my own msft.csv file in my directory doesn't 
change anything as it is still pointing to some other msft.csv someplace on my 
computron. (what and where is this file?)

I also have never opened a file this way. I had prevously just used something 
like:

for l in open(filename).readlines():
   l = l.strip().split()
   data.append([float(l[0]), float(l[1]), float(l[2]), int(l[3])])

values = [1,2,3,4]

-

I think ithis is just some example file that gets installed some place so that 
the examples work?

What does asfileobj=False do?

Goodness the whole world of Python has radically changed in the short time I 
have been out of the game. 



 On Aug 15, 2015, at 1:50 AM, Christian Alis iana...@gmail.com wrote:
 
 The sample code reads data from msft.csv. If you enter your data into
 a text editor and save it as msft.csv in python's current working
 directory, then the following minimal code (pruned from plotfile_demo)
 should work:
 
 from pylab import plotfile, show, gca
 import matplotlib.cbook as cbook
 
 fname = cbook.get_sample_data('msft.csv', asfileobj=False)
 
 #test 5; single subplot
 plotfile(fname, ('date', 'open', 'high', 'low', 'close'), subplots=False)
 
 show()
 


--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2013-08-16 Thread Kevin Hunter Kesling
At 12:11pm -0400 Fri, 16 Aug 2013, Matthew Brett wrote:
 We've got 5 macs running OSX 10.4 through 10.8 for us, you'd be
 welcome to remote access to those, and we'd be happy to run builds
 for you. Paul Ivanov has or will have access to the buildbot master
 and all the slaves. We also have an XP and Windows 7 64 bit machine
 you are welcome to use.

Bless you for supporting OS X prior to 10.6!  My family still has a 
quite functional OS X 10.5 machine that we should update but can't for 
various (less than stellar, but unfortunately real) reasons.  I'm 
chagrined that Apple et al. no longer supports 10.5.  I'm sure others 
feel similarly about their 10.4- machines.

On the other hand, no one would blame a development team that decided 
not to support what even Apple does not support.

Cheers,

Kevin

--
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with 2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] zig-zag to represent suppressed 0 on axis?

2013-04-08 Thread Kevin Hunter Kesling
At 4:20pm -0400 Sun, 07 Apr 2013, Francesco Montesano wrote:
 Il giorno 07/apr/2013 21:03, Kevin Hunter Kesling ha scritto:
 On the other hand, I'm still such a noob at Matplotlib ... is there
 a way to have one of the subplots take up more than its default 50%
 allotment?

 you can give a look at the last two plots in this example
 http://matplotlib.org/examples/pylab_examples/demo_tight_layout.html or use
 plot.axes providing the rectangle that you want

That is closer to what I want, but still not there.  I was finally able 
to find something that fit the bill to 95% of what I want:

http://matplotlib.1069221.n5.nabble.com/Proposal-for-Broken-Axes-td38050.html

The first post by 'klukas' does exactly what I asked for.  It's a 
zig-zag on the Y-axis to show that what is graphed is not continuous, 
and unlike the various official examples, the zig-zag placement is 
user-specifiable, as opposed to exactly halfway between the top and bottom.

The only thing I have yet to figure out how to do is to simultaneously 
have a zig-zag on the X axis as well -- an artifact of how these 
zig-zags must be created via multiple axes on the same figure, rather 
than as built in to the axis artist.

For googleability:

The above linked graph code enables for matplotlib:

  - suppressed zeros on the Y-axis of an XY plot
  - showing suppressed data on the Y-axis
  - lightning bolt symbol on the Y-axis
  - zig-zag on the Y-axis
  - a broken Y-axis

Thanks for your pointers, Francesco, as they helped me to fine-tune my 
Google search terms.  And thank you, Klukas, whoever you are.

Cheers,

Kevin

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] zig-zag to represent suppressed 0 on axis?

2013-04-07 Thread Kevin Hunter Kesling
Hullo Matplotlib List,

I'm looking for a way to represent on an X-Y graph the fact that an axis 
does not start from the origin.  When drawing by hand, I'll use a little 
zig-zag, lightning bolt, or slight space on the axis in question to 
represent this fact, just off from where the X and Y axis lines meet. 
How would I go about telling Matplotlib to do this?  After two hours of 
perusing the Axes documentation, and tooling around in an IPython shell, 
I appear to be striking out.

If you are using a monospaced font to view this email, this may 
illustrate the functionality for which I'm looking:


  150 ||  * *
  145 ||  *  *
  140 || **
  135 || *
  130 ||
  /
   /   zig zag I want
  ||
0   
   0   1   2   3   4   5   6   7   8


Many thanks for any help,

Kevin

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] zig-zag to represent suppressed 0 on axis?

2013-04-07 Thread Kevin Hunter Kesling
At 2:34pm -0400 Sun, 07 Apr 2013, Francesco Montesano wrote:
 2013/4/7 Kevin Hunter Kesling
 I'm looking for a way to represent on an X-Y graph the fact that an axis
 does not start from the origin.  When drawing by hand, I'll use a little
 zig-zag, lightning bolt, or slight space on the axis in question to
 represent this fact, just off from where the X and Y axis lines meet.
 How would I go about telling Matplotlib to do this?  After two hours of
 perusing the Axes documentation, and tooling around in an IPython shell,
 I appear to be striking out.

 If you are using a monospaced font to view this email, this may
 illustrate the functionality for which I'm looking:

150 ||  * *
145 ||  *  *
140 || **
135 || *
130 ||
/
 /   zig zag I want
||
  0   
 0   1   2   3   4   5   6   7   8

 Have you given a look at this example:
 http://matplotlib.org/examples/pylab_examples/broken_axis.html

Damn, I clearly missed that one.  And once I know what I'm looking for, 
my eye goes right to it.  Sorry for the noise.

On the other hand, I'm still such a noob at Matplotlib ... is there a 
way to have one of the subplots take up more than its default 50% allotment?

Thanks,

Kevin

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib Slider Widget and changing colorbar threshold

2013-03-14 Thread kevin
I am currently trying to work on a program that will allow the user to
display their dataset in the form of a colormap and through the use of
sliders, it will also allow the user to adjust the threshold of the colormap
and thus update the colormap accordingly.  The best to describe this would
be through the use of a picture:  


  [1]: http://i.stack.imgur.com/1T9Qp.png


This image shows how the colorbar should look before (the image on the left)
and after (the image on the right) the adjustment.  As the threshold values
of the colrobar are changed, the colormap would be updated accordingly.

Now I am mainly using matplotlib and I found that matplotlib does support
some widgets, such as a slider.  However the area I need help in is devising
a piece of code which will update the colorbar and colormap (like the way
shown in the picture above) when the slider is adjusted.  I was wondering if
anyone has done this before and might have a piece of code they would be
willing to share and might have pointers as to how this can be achieved.



--
View this message in context: 
http://matplotlib.1069221.n5.nabble.com/Matplotlib-Slider-Widget-and-changing-colorbar-threshold-tp40654.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Where did the list of methods go?

2012-10-13 Thread Kevin Davies

  
  
I noticed that the list of matplotlib.pyplot methods has moved on
the website. I used to rely on it for quick information, but now
Google doesn't even return it easily. For the record, the
information now seems to be at

http://matplotlib.org/api/pyplot_summary.html.

Kevin


  


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] who (F/OSS science) uses matplotlib?

2012-06-05 Thread Kevin Hunter
At 8:15pm -0400 Sun, 03 Jun 2012, Josef wrote:
 On Sun, Jun 3, 2012 at 7:41 PM, Kevin Hunter wrote:
 I've just spent 20 minutes of searching with various terms and no luck
 finding even one answer: What open source projects use matplotlib?

 Maybe scanning the Debian required and recommended dependencies might
 be informative.
 (I wouldn't know how to do it.)

This is a good idea.  Heh, one that requires more time investment than I 
was hoping after a simple search, but a good idea nonetheless.

Thanks,

Kevin

--
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] who (F/OSS science) uses matplotlib?

2012-06-05 Thread Kevin Hunter
At 10:47pm -0400 Sun, 03 Jun 2012, Tom Dimiduk wrote:
 Very few people outside my group use it at the moment, but that looks
 to be changing at least a bit. I will hopefully get a paper out about
 the code by the end of the summer.

I'm in a similar boat with the research on which I'm working, paper and 
all.  I don't know if folks will end up using it or not, but at least it 
is available (github), if not well advertised to the (decidedly small) 
niche of folks who would be interested.

Cheers,

Kevin

--
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] who (F/OSS science) uses matplotlib?

2012-06-05 Thread Kevin Hunter
At 3:31pm -0400 Mon, 04 Jun 2012, Michael Droettboom wrote:
 This is one of the big challenges of open science right now, in my
 opinion, is how to better share the *applications* for science
 rather than just the *libraries*.

This is a good point.  I've had similar observations but haven't been 
able to voice this particular facet, and certainly not so succinctly.

One thought I had, assuming John Hunter et al. would be open to it, is 
basically having a Who uses matplotlib? section on the website.  Good 
for one-off cases like my question two days ago, and also good for 
general project evangelism.

Cheers,

Kevin

--
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] who (F/OSS science) uses matplotlib?

2012-06-05 Thread Kevin Hunter
At 10:25am -0400 Tue, 05 Jun 2012, Tom Dimiduk wrote:
 On 06/05/2012 10:14 AM, Kevin Hunter wrote:
 At 10:47pm -0400 Sun, 03 Jun 2012, Tom Dimiduk wrote:
 Very few people outside my group use it at the moment, but that
 looks to be changing at least a bit. I will hopefully get a paper
 out about the code by the end of the summer.

 I'm in a similar boat with the research on which I'm working, paper
 and all. I don't know if folks will end up using it or not, but at
 least it is available (github), if not well advertised to the
 (decidedly small) niche of folks who would be interested.

 What is your project?

Heh.  It didn't occur to me that I should answer my own question!  :-)

http://temoaproject.org/

Briefly an energy-economy optimization (EEO) model and surrounding 
tools.  If you just learned what that means, well ... welcome to the 
(decidedly small) niche!

 Like probably anyone in this situation, I have written a bunch of little
 convenience tools working with images, a simple matplotlib based gui to
 provide richer imshow image interaction (clicking to get pixel
 coordinates), more user friendly wrappers around scipy functions to do
 what is at least the most common case for us, and things of that sort.

 Is any of this stuff I should be looking to upstream or split off into
 the start of a scientific imaging library for python?

Potentially.  I'm haven't explored that area for my research yet, but I 
*do* plan for a GUI.  (Oh, but if plans were worth a nickel ...)  For 
the types of analysis one generally (well, currently, anyway) does with 
EEO models, static graphics seem to be the method du jour.  Thus, I'm 
not to the point of manipulating graphics yet, just generating various 
y(x) graphs with my scripts for later consumption.

Unfortunately, what we (I) do with our various ad-hoc scripts is not at 
all integrated yet, so we are currently just a (thankful) consumer.

Cheers,

Kevin

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


[Matplotlib-users] who (F/OSS science) uses matplotlib?

2012-06-03 Thread Kevin Hunter
Hullo List,

I've just spent 20 minutes of searching with various terms and no luck 
finding even one answer: What open source projects use matplotlib?

I'm especially interested in open source /science/ projects that use 
matplotlib.

I got excited when I saw scienceoss.com, but I still could not find a 
link to an actual science project, much less an open source one.

Many thanks for any pointers!

Kevin

--
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] strange behaviour with sankey diagram (maybe a bug)

2012-05-21 Thread Kevin Davies

  
  
Hi Giovanni,

Thanks for your report.  It looks like in this case the "dip" in the large, single input caused the input label to be at the center of the diagram.  You might want to try increasing the trunklength parameter.  Maybe someone has ideas to make this sort of thing more automatic, but otherwise it takes some manual tweaking.  I hope this helps.

Kevin


On 05/21/2012 11:39 AM, Giovanni wrote:

Hi all! I'm experiencing a strange behaviour with sankey diagram. As
you can see from the attached image, the patch label it's not
positioned in the middle of the patch (as it should), but it's plotted
over the first label... The code is attached also.
Any hints?

Thanks,
  Giovanni
  
  
  
  --
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] matplotlib.sankey: boxes spliced into flow?

2012-03-16 Thread Kevin Davies
Hi Kevin,

Thanks for your post.  I think the short answer is that the solution 
will require some manual adjustments.

It has been a little while since I worked with the Sankey class, but 
I'll try to give some detail.  The entire Sankey diagram is a composite 
of sub-diagrams.  Each sub-diagram may have its own input and output 
branches.  The sub-diagrams are joined at matching inputs/outputs.

So, based on the images you shared, I think there are several areas that 
will need some manual work or hacks:
1.  Since the height of Page Load (first diagram) is greater than the 
sum of the heights of its inputs and outputs, it will be tricky.  You 
could try creating Page Load as a sub diagram with 5 inputs and 5 
outputs, where the first and last inputs/outputs are dummy branches to 
add the additional height.  You could also add page load as an 
additional rectangular patch, but that would require manual placement, 
and it would need to be placed in the proper order to overlay Browsing 
loop.  That might require 2 unconnected Sankey diagrams.
2.  It may require tweaking or more sub-diagrams that you'd expect to 
get the +/- 30 or so degree angles on the Organic and Direct 
branches (first diagram).
3.  The second diagram introduces additional complexities.  The white 
backgrounds of the text boxes might be possible by specifying the 
properties of the existing text, but I'm not sure.
4.  It will be necessary to manually adjust the length of the 
Electricity branch so that it lines up with the Steam branch (second 
diagram).  Likewise for the Fuel and Auxiliary Fuel.  That is one 
definite drawback of the matplotlib Sankey class as it is; where 
branches split and rejoin or form a circuit, manual adjustment may be 
necessary.
4. Finally, it may be difficult to reproduce the shading of the branches 
in the second diagram.

I'm sorry that there's no out of the box solution.  However, since 
matplotlib and Python is so flexible, it may be fairly straightforward 
to automate these additional features.  I also suspect that some of the 
features of the diagrams may be artifacts of the particular software 
used--not necessarily due to the preferences of your colleague.

Kevin


On 03/15/2012 10:56 AM, Kevin Hunter wrote:
 Hullo matplotlib list,

 I've discovered (with pleasure!) that matplotlib has recently learned
 how to create Sankey diagrams.  Thank you Kevin and Yannick!

 One of my less-technically inclined fellow graduate students is
 searching for his toolset of choice for generating these suckers, and is
 currently looking at Stan.  As I'm an open-source advocate I'd love to
 be able to say, you can do this with X, where X in this case is
 clearly matplotlib.

 Specifically, I've not heavily used matplotlib before, and from the
 given examples I see on matplotlib.sf.net, I'm not clear on exactly the
 capabilities of this recently-added code.  What my fellow grad student
 has opined would be nice for his uses would be boxes that are built into
 the flows, rather than just used as labels.  Something like:

 Page Load
 http://modernl.com/images/diagrams/web-traffic-sankey-diagram.png

 Input, Gas Turbine, HRSG, Waste, BP Turbine, Output
 http://www.bucknell.edu/images/Depts/Facilities/sankeythumb.jpg

 Is this currently possible, /without/ manually adjusting the graphic?

 Thanks!

 Kevin

 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] matplotlib.sankey: boxes spliced into flow?

2012-03-15 Thread Kevin Hunter
Hullo matplotlib list,

I've discovered (with pleasure!) that matplotlib has recently learned 
how to create Sankey diagrams.  Thank you Kevin and Yannick!

One of my less-technically inclined fellow graduate students is 
searching for his toolset of choice for generating these suckers, and is 
currently looking at Stan.  As I'm an open-source advocate I'd love to 
be able to say, you can do this with X, where X in this case is 
clearly matplotlib.

Specifically, I've not heavily used matplotlib before, and from the 
given examples I see on matplotlib.sf.net, I'm not clear on exactly the 
capabilities of this recently-added code.  What my fellow grad student 
has opined would be nice for his uses would be boxes that are built into 
the flows, rather than just used as labels.  Something like:

Page Load
http://modernl.com/images/diagrams/web-traffic-sankey-diagram.png

Input, Gas Turbine, HRSG, Waste, BP Turbine, Output
http://www.bucknell.edu/images/Depts/Facilities/sankeythumb.jpg

Is this currently possible, /without/ manually adjusting the graphic?

Thanks!

Kevin

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Ternary Plot

2011-11-10 Thread Kevin Davies
Elmar,
Please let me know if you have any comments or suggestions on the 
ternary projection.  I hope that it's not too far from being worthy to 
pull into matplotlib.  (I'd need to merge the branch with the latest 
development version of matplotlib.)

Thanks,
Kevin


On 11/04/2011 07:11 AM, Elmar Werling wrote:
 On 03.11.2011 22:28, Joe Kington wrote:
 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
 mailto:ben.r...@ou.edu  wrote:



  On Thu, Nov 3, 2011 at 2:58 PM, elmar werling
  el...@net4werling.de
  mailto:el...@net4werling.de  wrote:

  Hi,

  could not found anything like plot_ternary() in the matplotlib
  documentation. Is there an easy to use method to plot data
  points and
  lines in a ternary plot using matplotlib?

  Any hint is wellcome

  Elmar


  This is a requested feature, but has not been implemented yet within
  matplotlib.  However, some other users have created a hack to do this:

  http://old.nabble.com/Ternary-or-triangle-plots-td32506324.html

  Ben Root


  
 --
  RSA(R) 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
  mailto:Matplotlib-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users




 --
 RSA(R) 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
 thanks - hope it will help
 elmar


 --
 RSA(R) 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(R) 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


[Matplotlib-users] 3d plots: set view angle (azimuth and elevation)

2009-09-19 Thread Kevin Dunn
Thanks for a great library and excellent documentation.

I'm using mpl_toolkits.mplot3d.Axes3D (version 0.99.0) to generate a 3D
scatter plot and the web examples have been very useful so far.  But I have
these questions to which I can't find answers in the mailing lists or the
website:

a) can you programmatically set the viewing angle (azimuth and elevation)?
I noticed the ax.get_proj() function, but was hoping there would be an
ax.set_proj(elev=..., az=) function also.
b) can you set all 6 sides of the bounding box to show up, instead of 3, but
set their faces to be transparent (of course!)

Thanks,
Kevin
--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] how to create a barh chart, right to left

2009-05-15 Thread kevin gill
I am a matplotlib newbie. I am trying to create a Population Pyramid 
chart, see examples here.

http://bm2.genes.nig.ac.jp/RGM2/R_current/library/epicalc/man/pyramid.html

I am trying to draw this as two horizontal bar charts (barh) back to back.

How do I make the left chart display right to left instead of the 
default left to right?

Also, are there examples of this type of chart drawn in matplotlib 
available?

Thanks

Kevin



--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Leftmost column of PNG output is transparent

2009-03-25 Thread Kevin Milner
Maybe I'll try the latest SVN version. I'm running the version in the 
ubuntu 8.10 repositories, which appears to be 0.98.3

As for both contourf and pcolor, I was just testing to see that it was 
messed up either way, leaving one commented and one uncommented. Having 
them both uncommented was just a typo, but the problem persists either way.

Thanks,
Kevin

Jae-Joon Lee wrote:
 I couldn't reproduce it (my output has no transparent column). I'm
 running the current svn. I wonder if others can reproduce it.

 Kevin,
 what happen if you only do one of the pcolor or the contourf (it is
 not clear why you're calling pcolor as it will be overridden by
 contourf)?

 -JJ


 On Mon, Mar 23, 2009 at 5:10 PM, kmilner kmil...@usc.edu wrote:
   
 Hi All,

 I'm trying to plot evenly grided data to tiles for google maps overlays.
 Each tile needs to be a 256x256 pixel PNG image, without any borders.

 The problem that I'm having is that the leftmost column of the resultant PNG
 image (saved using FigureCanvasAgg.print_figure) is transparent.

 My real code uses basemap because the output has to be in the mercator
 projection, but the sample code below is simplified to exclude it. You can
 view the sample image that is produced at this address:
 http://earth.usc.edu/ftp/kmilner/trans_test.png

 Any ideas?

 Thanks!
 Kevin

 #!/usr/bin/env python

 from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
 from matplotlib.figure import Figure
 import numpy

 dpi = 64
 pixels = 256
 fig = Figure(linewidth=0, frameon=False)
 canvas = FigureCanvas(fig)

 fig.figurePatch.set_alpha(0.0)

 ax_bounds = [0, 0, 1, 1]

 ax = fig.add_axes(ax_bounds, axisbg=(1.0,1.0,0.0,0.0),
frameon=False )

 inches = pixels / dpi
 fig.set_size_inches(256 / dpi, 256 / dpi)

 num = 31

 z = numpy.empty( (num, num) )

 for x in xrange(num):
for y in xrange(num):
z[x, y] = x * y

 x, y = numpy.meshgrid( range(num), range(num) )

 image = ax.pcolor(x, y, z)
 image = ax.contourf(x, y, z)

 canvas.print_figure(/tmp/trans_test.png, dpi=dpi)
 --
 View this message in context: 
 http://www.nabble.com/Leftmost-column-of-PNG-output-is-transparent-tp22669232p22669232.html
 Sent from the matplotlib - users mailing list archive at Nabble.com.


 --
 Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
 powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
 easily build your RIAs with Flex Builder, the Eclipse(TM)based development
 software that enables intelligent coding and step-through debugging.
 Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

 

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] errorbar and legend(loc='best') gives error

2008-03-06 Thread Kevin Christman
When errorbar() and legend(loc='best') are used an error message appears. But 
other legend locations (e.g. 'upper left' or 'upper right') work fine.
pylab.figure()
pylab.errorbar(xdata,ydata,z*y_standardError,fmt='o-',label='test')  
pylab.legend(loc='best')
pylab.show()


Exception in Tkinter callback
Traceback (most recent call last):
  File C:\Python25\lib\lib-tk\Tkinter.py, line 1403, in __call__
return self.func(*args)
  File C:\Python25\Lib\site-packages\matplotlib\backends\backend_tkagg.py, 
line 188, in resize
self.show()
  File C:\Python25\Lib\site-packages\matplotlib\backends\backend_tkagg.py, 
line 191, in draw
FigureCanvasAgg.draw(self)
  File C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py, line 
358, in draw
self.figure.draw(self.renderer)
  File C:\Python25\Lib\site-packages\matplotlib\figure.py, line 624, in draw
for a in self.axes: a.draw(renderer)
  File C:\Python25\Lib\site-packages\matplotlib\axes.py, line 1345, in draw
a.draw(renderer)
  File C:\Python25\Lib\site-packages\matplotlib\legend.py, line 236, in draw
self._update_positions(renderer)
  File C:\Python25\Lib\site-packages\matplotlib\legend.py, line 579, in 
_update_positions
ox, oy = self._find_best_position(w, h)
  File C:\Python25\Lib\site-packages\matplotlib\legend.py, line 463, in 
_find_best_position
verts, bboxes, lines = self._auto_legend_data()
  File C:\Python25\Lib\site-packages\matplotlib\legend.py, line 378, in 
_auto_legend_data
hlines = handle.get_lines()
AttributeError: LineCollection instance has no attribute 'get_lines'






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Integrating plots with existing PyGTK application

2008-02-21 Thread Kevin Milner
Hi everyone,

I am a developer on a PyGTK application for Earth Science research and 
education called SEATREE ( http://geosys.usc.edu/projects/seatree/wiki ) 
and we are trying to integrate some pylab plots.

I can successfully create and use a pylab frame/window inside of our GTK 
application using the following sequence (note that all of this is 
called AFTER the application has launched and the GTK main loop has 
started):

-
import math
import pylab as p
import matplotlib
from matplotlib.backends.backend_gtk import FigureCanvasGTK, 
NavigationToolbar   
matplotlib.use('GTK')

p.figure()
//set up the figure
//connect actions using p.connect('signal name', function)
p.show()
-

Then, once I'm done with the plot and it is closed, p.close() is called.

All of that works fine, and I actually like the blocking nature of the 
p.show() method (I know this probably isn't the best way since I already 
have a GTK main loop going). The problem arises when I try to display 
the plot again. If I just call the p.show() method for a 2nd time, it 
does not block execution of my function, and the plot shows up but is 
unresponsive with full CPU utilization. My main GTK window for the 
application is enabled and responsive during this time.

I then tried using the following code to show the window (either both 
times or just the 2nd time around):

-
for manager in Gcf.get_all_fig_managers():
manager.window.show()
-

But I get an error that is very strange, as it references Tkinter even 
though I am using GTK:

-
Traceback (most recent call last):
  File 
/home/kevin/workspace_seatree/SEATREE/py-drivers/py-hc/flowGUI.py, 
line 379, in editVisc
manager.window.show()
  File /usr/lib/python2.5/lib-tk/Tkinter.py, line 1724, in __getattr__
return getattr(self.tk, attr)
AttributeError: show
-

Finally, I tried just not calling anything after p.frame() the second 
time through (besides doing the signal connecting again), and this time 
the plot window will show up, but signals will not be processed 
(including trying to close the plot with the 'x' on the window frame).

I also tried just embedding a FigureCanvasGTK object displaying the 
figure to my own gtk.Dialog object, which works for displaying the plot, 
but I couldn't figure out how to get the pylab events to be processed 
and connected (I need to modify the plot by clicking on parts of it). If 
I could figure out the even handling, this would actually be the 
preferred method of showing the plot. This is the code for this attempt:

-
self.dialog = gtk.Dialog(title=title, parent=parent, flags= 
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
self.canvas = FigureCanvasGTK(self.figure)
self.dialog.vbox.pack_start(self.canvas)
self.dialog.show_all()
self.dialog.show()
-

Does anyone have any suggestions? Thanks a ton for making it this far 
through my long message!

Kevin Milner

P.S. see full source here: (the pylab stuff is dirty cause it's in 
debugging stages)
See bottom for the p.show() call: 
http://geosys.usc.edu/projects/seatree/browser/py-drivers/py-hc/flowGUI.py
Event processing/plot creation and manipulation: 
http://geosys.usc.edu/projects/seatree/browser/py-drivers/py-hc/manipulate_hc.py

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] autoscaling y-axis after changing xmin and xmax?

2006-09-25 Thread Kevin Horton
I'm using matplotlib 0.87.5.  I'm working on an application that has  
an interface that allows the user to change xmin and xmax to focus in  
on portions of the dataset.  I'd like the y axis to autoscale each  
time the xmin and/or xmax are changed.  I've confirmed that  
autoscale_on is True, but no autoscaling occurs.

What drives the y axis autoscaling?  Does it look only at the data  
between xmin and xmax, or does it look at the whole data series?  Is  
there a way to make autoscale do what I want, or would I need to  
change the data set each time to only be plotting between xmin and xmax?

Kevin Horton
Ottawa, Canada



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Response times of GTK vs GTKAgg backends

2006-09-07 Thread Kevin Horton
On 7-Sep-06, at 12:05 PM, Christopher Barker wrote:

 Kevin Horton wrote:

  I also want to note that the GTK
 backend is useful to some people, and hope that it will continue to
 be supported (I seem to recall one mention that it was little used).

 This is a good point. In general, the Agg back-ends produce nicer an
 more consistent results, and, on local machines, performance is just
 fine, but in a remote X-session, there are real advantages to using X
 for the rendering. The same probably applies to the TK and Wx back- 
 ends
 also.

Thanks for the explanation on the difference in these backends.

I did notice many artifacts in the plots when using the GTK backend,  
especially when only setting xmin and xmax to only display a small  
portion of the data .  Is this a known problem?  Is there interest in  
correcting it, and if so, is there any information I can provide to  
assist, or any testing I can do?

Kevin Horton
Ottawa, Canada



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Response times of GTK vs GTKAgg backends

2006-09-06 Thread Kevin Horton
I'm developing an application for personal use on my Mac, using the  
GTAgg backend, which renders a series of plots in a figure in a pygtk  
scrolled window.  I'm currently using matplotlib 0.87.3 installed via  
Fink.  Matplotlib is performing well.

Today I had occasion to log into my Mac over ssh from work.  I noted  
that the application was extremely slow to display the plots.   
Running locally on my Mac, the application takes about 5 seconds to  
display the plots when it opens.  Remotely, it took around 5 minutes  
(repeatable).  On a whim, I tried changing to the GTK backend - now  
it displayed the plots in about 20 seconds, which is quite acceptable  
considering it is remote access over an ssh tunnel.

I checked the CPU usage on both the Mac, and my work PC - the CPU  
usage was very, very low on both machines, so I'm not sure where the  
bottleneck lies.  My install rights on the work PC are very  
restricted, so I'm using CygWin via XLiveCD, which I have copied onto  
the hard drive to speed it up.

http://xlivecd.indiana.edu/

This poor performance when using GTKAgg isn't really a problem - I'll  
code a command line switch to change to the GTK backend for the few  
times I need remote access.  I'm reporting it just in case one of the  
developers thinks it could be useful to troubleshoot, in case it  
highlights a problem in the code.  I also want to note that the GTK  
backend is useful to some people, and hope that it will continue to  
be supported (I seem to recall one mention that it was little used).

Thanks for matplotlib.

Kevin Horton
Ottawa, Canada



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] More than 9 subplots in Figure?

2006-09-04 Thread Kevin Horton
I'm a python newbie, using matplotlib 0.87.3.  My code works, as long  
as I limit myself to 9 subplots.  But, I need more than 9.

Relevant parts of the code:

from matplotlib.figure import Figure
import pylab
f = Figure(figsize=(5,4), dpi=100)
plot1 = f.add_subplot((10,1,1), ylabel='Pitch (' + degreeChar + ')')

I get an error like:
Traceback (most recent call last):
   File Flt_Test_Data_Review.py, line 726, in ?
 create_mpl_plots()
   File Flt_Test_Data_Review.py, line 246, in create_mpl_plots
 plot1 = f.add_subplot((10,1,1), ylabel='Pitch (' + degreeChar +  
')')
   File /sw/lib/python2.4/site-packages/matplotlib/figure.py, line  
472, in add_subplot
 a = Subplot(self, *args, **kwargs)
   File /sw/lib/python2.4/site-packages/matplotlib/axes.py, line  
4316, in __init__
 SubplotBase.__init__(self, fig, *args)
   File /sw/lib/python2.4/site-packages/matplotlib/axes.py, line  
4208, in __init__
 raise ValueError('Argument to subplot must be a 3 digits long')
ValueError: Argument to subplot must be a 3 digits long

subplot accepts a tuple in other places, so I would have expected the  
same behaviour here.  Is this a bug that is fixed in a newer  
matplotlib version, in which case I will try to upgrade.  Or, is  
there some other way to do my code that will work?

Thanks,

Kevin Horton
Ottawa, Canada



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] More than 9 subplots in Figure?

2006-09-04 Thread Kevin Horton
On 4 Sep 2006, at 10:54, John Hunter wrote:

 Kevin == Kevin Horton [EMAIL PROTECTED] writes:
 Kevin subplot accepts a tuple in other places, so I would have
 Kevin expected the same behaviour here.  Is this a bug that is
 Kevin fixed in a newer matplotlib version, in which case I will
 Kevin try to upgrade.  Or, is there some other way to do my code
 Kevin that will work?

 You need to either do

   subplot(10,1,1)

 or

   tup = 10,1,1
   subplot(*tup)

 subplot does not accept a tuple: it either accepts and integer, eg

   num = 311
   subplot(num)

 or three args: numrows, numcols, num

 python let's you unpack tuple with the * operator.

That works.  Thank you very much.

Kevin Horton
Ottawa, Canada



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users