Re: [Matplotlib-users] [Enthought-Dev] EuroSciPy 2013

2013-04-30 Thread Thomas Lecocq
Just to stress the following:

While the tutorial program is already online, the deadline for the call for 
abstracts
 just got extended to May 5, 2013.  So there is still about a week to 
submit an interesting topic for a talk or a poster. You use Python for 
interesting scientific projects? Please consider presenting your work in
 Brussels.


Thomas

**
Dr Thomas Lecocq 
Geologist
Royal Observatory of Belgium

- Seismology -
**


From: thlec...@msn.com
To: enthought-...@enthought.com; matplotlib-users@lists.sourceforge.net
Date: Sun, 28 Apr 2013 10:53:57 +
Subject: [Enthought-Dev] EuroSciPy 2013




FYI

 Message original 
  

  
Sujet: 
EuroSciPy 2013 - Deadline of the call for abstracts on
  28 april and many updates
  
  
Date : 
Mon, 22 Apr 2013 19:50:04 +0200
  
  
De : 
Organisation of EuroScipy
  euroscipy-...@python.org
  
  
Pour : 
Organisation of EuroScipy
  euroscipy-...@python.org
  

  
  

  

  Dear Scientist using Python,

EuroSciPy is the European Conference on Python in Science. The call for
abstracts for oral and poster presentations for EuroSciPy 2013 closes at the end
of this week, on 28 april. We welcome your applications via our website
https://www.euroscipy.org/. As a reminder, our keynote speakers are Cameron
Neylon (Public Library of Science) and Peter Wang (Continuum Analytics).

Find more below! Tutorials, sprints, focus issue of the journal Computational
Science and Discovery (IOP), proceedings and participant support!

We are glad to announce that the tutorial program is online at
https://www.euroscipy.org/schedule/tutorials/. As usual, our tutorial speakers
will cover all the basics in a beginner track and many powerful tools in the
advanced track.

Three sprints will be organized on the day following the conference: Python
visualization, Sage: Open Source Mathematics Software and NumPy and SciPy. More
information at https://www.euroscipy.org/program/sprints/.

Contributors to EuroSciPy 2013 will benefit from two communication
opportunities:
1. An invitation to submit full and original research papers to be reviewed for
   a focus issue (jointly with the SciPy 2013 conference) on Scientific
   Computing with Python in Computational Science  Discovery (CSD), IOP
   Publishing's electronic-only, multidisciplinary journal for the computational
   science community. Further details (guest editors, issue scope, submission
   details, etc) will be announced soon.
2. An invitation to submit their contribution as a paper for the EuroSciPy 2013
   proceedings that will be published. Further details will be announced soon.

Thanks to NumFOCUS and PySV, travel support will be provided to a small number
of students/participants based on their contribution to the conference and/or to
the scientific Python tools. More information will follow during the
registration period.

SciPythonic Regards,

The EuroSciPy 2013 Committee


**
Dr Thomas Lecocq 
Geologist
Royal Observatory of Belgium

- Seismology -
**
  

___
Enthought-Dev mailing list
enthought-...@mail.enthought.com
https://mail.enthought.com/mailman/listinfo/enthought-dev   
  --
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with 2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] EuroSciPy 2013

2013-04-28 Thread Thomas Lecocq
FYI

 Message original 
  

  
Sujet: 
EuroSciPy 2013 - Deadline of the call for abstracts on
  28 april and many updates
  
  
Date : 
Mon, 22 Apr 2013 19:50:04 +0200
  
  
De : 
Organisation of EuroScipy
  euroscipy-...@python.org
  
  
Pour : 
Organisation of EuroScipy
  euroscipy-...@python.org
  

  
  

  

  Dear Scientist using Python,

EuroSciPy is the European Conference on Python in Science. The call for
abstracts for oral and poster presentations for EuroSciPy 2013 closes at the end
of this week, on 28 april. We welcome your applications via our website
https://www.euroscipy.org/. As a reminder, our keynote speakers are Cameron
Neylon (Public Library of Science) and Peter Wang (Continuum Analytics).

Find more below! Tutorials, sprints, focus issue of the journal Computational
Science and Discovery (IOP), proceedings and participant support!

We are glad to announce that the tutorial program is online at
https://www.euroscipy.org/schedule/tutorials/. As usual, our tutorial speakers
will cover all the basics in a beginner track and many powerful tools in the
advanced track.

Three sprints will be organized on the day following the conference: Python
visualization, Sage: Open Source Mathematics Software and NumPy and SciPy. More
information at https://www.euroscipy.org/program/sprints/.

Contributors to EuroSciPy 2013 will benefit from two communication
opportunities:
1. An invitation to submit full and original research papers to be reviewed for
   a focus issue (jointly with the SciPy 2013 conference) on Scientific
   Computing with Python in Computational Science  Discovery (CSD), IOP
   Publishing's electronic-only, multidisciplinary journal for the computational
   science community. Further details (guest editors, issue scope, submission
   details, etc) will be announced soon.
2. An invitation to submit their contribution as a paper for the EuroSciPy 2013
   proceedings that will be published. Further details will be announced soon.

Thanks to NumFOCUS and PySV, travel support will be provided to a small number
of students/participants based on their contribution to the conference and/or to
the scientific Python tools. More information will follow during the
registration period.

SciPythonic Regards,

The EuroSciPy 2013 Committee


**
Dr Thomas Lecocq 
Geologist
Royal Observatory of Belgium

- Seismology -
**
  --
Try New Relic Now  We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app,  servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] github - basemap and contributing...

2013-03-12 Thread Thomas Lecocq
Dear all,

I've successfully forked matplotlib.basemap to 
ThomasLecocq.basemap and cloned ThomasLecocq.basemap to my machine. Now,
 how can I have this clone be THE mpl_toolkits.basemap package, so I can
 make edits in the __init__.py (that contains the Basemap class) and 
preview them live on this machine. Once they are nice and OK, I can 
commit/push it to my master on github and probably create a pull request
 to the matplotlib.basemap git ?

Thanks a lot in advance,

Thom

ps : if this mail goes through and the previous didn't, might be becaused I did 
not use the forked term in the subject...

**
Dr Thomas Lecocq 
Geologist
Royal Observatory of Belgium

- Seismology -
**


  --
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Draw paths on map using matplotlib-basemap

2013-02-17 Thread Thomas Lecocq
hi,

You could just add a scatter point at the first x[0],y[0] of each group, maybe 
annotated with a name label ?

note, for efficiency purposes, you should label the axes outside of your loop 
(+ set the title too), you only need to do this once!

Cheers,

Thomas

**
Dr Thomas Lecocq 
Geologist
Royal Observatory of Belgium

- Seismology -
**


From: gle...@comunidad.unam.mx
To: matplotlib-users@lists.sourceforge.net
Date: Tue, 12 Feb 2013 19:47:19 +
Subject: [Matplotlib-users] Draw paths on map using matplotlib-basemap
















Thank you for your ideas, I leave the correct code to plot trajectories of any 
object, in my case I have drawn the trajectories of convective storms.
# --- Construimos el mapa ---
import numpy as npfrom mpl_toolkits.basemap import Basemapimport 
matplotlib.pyplot as pltfrom PIL import *fig = plt.figure(figsize=(12,12))
ax = fig.add_axes([0.1,0.1,0.8,0.8])
m = Basemap(projection='cyl', llcrnrlat=12, urcrnrlat=35,llcrnrlon=-120, 
urcrnrlon=-80, resolution='c', area_thresh=1000.)
m.bluemarble()m.drawcoastlines(linewidth=0.5)m.drawcountries(linewidth=0.5)m.drawstates(linewidth=0.5)
# --- Dibujamos paralelos y meridianos ---
m.drawparallels(np.arange(10.,35.,5.),labels=[1,0,0,1])m.drawmeridians(np.arange(-120.,-80.,5.),labels=[1,0,0,1])m.drawmapboundary(fill_color='aqua')
# --- Abrimos el archivo que contiene los datos ---
import pandas as pd
df = pd.read_csv('scm-2004.csv')for evento, group in df.groupby(['evento']):
latitude = group.lat.valueslongitude = group.lon.valuesx,y = 
m(longitude, latitude)plt.plot(x,y,'y-',linewidth=2 )
plt.xlabel('Longitud')plt.ylabel('Latitud')plt.title('Trayectorias de 
Sistemas Convectivos 2004')


plt.savefig('track-2004.jpg', dpi=100)
With the above code, I get
the desired figure. 60
paths drawn on 
the map of México.


I have only one last question: how could indicate the start of each of the 
storms, someone has an idea how I can do this?











--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users   
  --
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] add cirlce around lat lon

2011-12-06 Thread Thomas Lecocq

Dear,





you can try my tutorial to achieve this properly : 
http://www.geophysique.be/2011/02/20/matplotlib-basemap-tutorial-09-drawing-circles/





Cheers,





Thom





ps : on the things to do when I have some time list : commit a method to the 
default basemap package to do this...


Date: Tue, 6 Dec 2011 21:23:18 -0600
From: ben.r...@ou.edu
To: questions.a...@gmail.com
CC: Matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] add cirlce around lat lon



On Tuesday, December 6, 2011, questions anon questions.a...@gmail.com wrote:
 I would like to draw a simple circle around a specified latitude and 
 longitude but I cannot find an appropriate command.

 I have tried using
 map.drawgreatcircle(myLON, myLAT,myLON, myLAT, linewidth=20,color='k')
 but this doesn't do anything
 or even
 map.drawgreatcircle(myLON+1, myLAT+1,myLON-1, myLAT-1, linewidth=2,color='k')

 and this appears to draw a line.
 Any other commands I could try for this?
 thanks in advance


drawgreatcircle() doesn't actually draw a circle, but rather an arc that 
represents the shortest distance between two points on the globe.


Maybe you would rather use a Circle object?

Ben Root

--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users   
  --
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Can't set scatter plot point color

2011-03-06 Thread Thomas Lecocq

Dear,
 
Please also note that '+' and 'x' are lines, hence if you want them coloured, 
you'll need to set edgecolor=g rather than just color='g' ...
 
HTH
 
Thom

**
Dr Thomas Lecocq 
Geologist
Seismology
Royal Observatory of Belgium
**


 
 Date: Fri, 4 Mar 2011 10:49:09 -0800
 From: scott.han...@navistar.com
 To: matplotlib-users@lists.sourceforge.net
 Subject: Re: [Matplotlib-users] Can't set scatter plot point color
 
 
 Thank you for the reply.
 
 I discovered this myself yesterday. Now I have an official answer if people
 want a colored + or the x symbol in the scatter plot.
 
 Scott Hansen
 
 
 
 efiring wrote:
  
  On 03/02/2011 06:42 AM, Mr. Python wrote:
 
  I am unable to set the color of the scatter plot points using the code
  below:
 
  import matplotlib
  matplotlib.use('Qt4Agg')
 
  import matplotlib.pyplot as plt
  import numpy as np
 
  plt.scatter(newSpdVals, newEngLoadVals,c='g',marker='+')
  
  This is a bug in the handling of symstyle 2, which includes '+' and 'x'.
  
 
  #Add the graph title and x/y axis labels
  plt.title(Gear Span)
  plt.xlabel(Vehicle Speed (mph))
  plt.ylabel(Engine Load %)
  plt.show()
 
  No matter what I change the c parameter to ('b','r', etc.), the color of
  the
  scatter plot points are always black. The lists newSpdVals and
  newEngLoadVals have 100 dimmensions and are of type numpy.ndarray.
 
  I am using the following software and hardware:
 
  Windows XP
  Python 2.7
  PyQt4 (I launch the plot from a PyQt GUI. I don't embed the plot in the
  GUI).
  matplotlib 1.01
 
  In the beginning of the same function where my scatter plot code is, I
  added
  the following code to verify if the problem is due to the matplotlib/PyQt
  interface:
 
  a = np.linspace(-10,100,33)
  b = np.linspace(-32,400,33)
  plt.scatter(a, b,color='g',marker='+')
  
  Note the difference: here you are using a 'color' kwarg that is getting 
  passed directly to the AsteriskPolygonCollection, whereas before you 
  were using the 'c' kwarg that is being handled incorrectly in this case 
  inside of the scatter code.
  
  Eric
  
  plt.title(Gear Span)
  plt.xlabel(Vehicle Speed (mph))
  plt.ylabel(Engine Load %)
  plt.show()
 
  The points for this plot are colored green. I'm able to change the point
  color to blue, red, etc.
 
  Any ideas why I can't change the point color of my first graph? Thank
  you
  for your help.
 
 
  
  
  --
  What You Don't Know About Data Connectivity CAN Hurt You
  This paper provides an overview of data connectivity, details
  its effect on application quality, and explores various alternative
  solutions. http://p.sf.net/sfu/progress-d2d
  ___
  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/Can%27t-set-scatter-plot-point-color-tp31051071p31070224.html
 Sent from the matplotlib - users mailing list archive at Nabble.com.
 
 
 --
 What You Don't Know About Data Connectivity CAN Hurt You
 This paper provides an overview of data connectivity, details
 its effect on application quality, and explores various alternative
 solutions. http://p.sf.net/sfu/progress-d2d
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  --
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Can't produce plots using Matplotlib

2011-02-22 Thread Thomas Lecocq

Can you provide us with your script ?
 
Thomas

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 
 From: c...@ozemail.com.au
 Date: Tue, 22 Feb 2011 21:05:48 +1100
 To: matplotlib-users@lists.sourceforge.net
 Subject: [Matplotlib-users] Can't produce plots using Matplotlib
 
 Recently I downloaded and installed Python(x,y) Version 2.6.5.6 running under 
 Windows7 and now can't produce the plots that my programs produced under an 
 earlier version of Python(x,y). The programs seem to run correctly and 
 produce the same numerical results but I can't find the graphical output (if 
 it exists).
 I presume that the problem isn caused by either an incorrect use of 
 Matplotlib, an installation issue or my simply misunderstanding the use of 
 Spyder.
 I would greatly appreciate some guidance on how to solve this problem.
 --
 Index, Search  Analyze Logs and other IT data in Real-Time with Splunk 
 Collect, index and harness all the fast moving IT data generated by your 
 applications, servers and devices whether physical, virtual or in the cloud.
 Deliver compliance at lower cost and gain new business insights. 
 Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  --
Index, Search  Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Setting the ticks on an axis

2011-02-19 Thread Thomas Lecocq

Good evening,

 
 Hello,
 
 I was trying to change the tick values that show up on the y-axis. I
 wanted a more finer range than the default. So I added:
 
 ax.set_yticks(range(ax.get_ylim()[0], ax.get_ylim()[1], 400))
 
 to my plot. And before this line, I have
 
 ax.set_ylim(bottom=0, top=6000)
 
 I get the results I want, but I get the following warning:
 
 :91: DeprecationWarning: integer argument expected, got float
   ax.set_yticks(range(ax.get_ylim()[0], ax.get_ylim()[1], 400))
 

To avoid having the warning, you can explicitly provide ints :

 ax.set_yticks(range(int(ax.get_ylim()[0]), int(ax.get_ylim()[1]), 400))

I don't know any easier method of setting the ticks... Let's wait for the user 
community input !

Cheers,

Thomas
  --
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Trouble with api example code within watermark_image.py

2011-02-09 Thread Thomas Lecocq

matplotlib.cbook documentation :
 
http://matplotlib.sourceforge.net/api/cbook_api.html?highlight=matplotlib.cbook#matplotlib.cbook.get_sample_data
 

matplotlib.cbook.get_sample_data(fname, asfileobj=True)¶

Check the cachedirectory ~/.matplotlib/sample_data for a sample_data file. If 
it does not exist, fetch it with urllib from the mpl svn repo
http://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/sample_data/
and store it in the cachedir.
If asfileobj is True, a file object will be returned. Else the path to the file 
as a string will be returned
To add a datafile to this directory, you need to check out sample_data from 
matplotlib svn:
svn co 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/sample_data
and svn add the data file you want to support. This is primarily intended for 
use in mpl examples that need custom data.
To bypass all downloading, set the rc parameter examples.download to False and 
examples.directory to the directory where we should look.

So, you have to have the logo.png image in the $home$/matplotlib/sample_data. 
If it is not present there, the script will try to download it from the server.
 
 
Thomas
 
ps : emailing 3 times the same question doesn't make the answer come faster.

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 
 Date: Wed, 9 Feb 2011 12:27:21 +0100
 From: thore.oltersd...@ise.fraunhofer.de
 To: matplotlib-users@lists.sourceforge.net
 Subject: [Matplotlib-users] Trouble with api example code within 
 watermark_image.py
 
 Dear Developers of Matplotlib,
 
 at first thanks for this mightiest tool for graphical output from python 
 data. I have encountered problems on trying the watermark feature as 
 described at 
 http://matplotlib.sourceforge.net/examples/api/watermark_image.html.
 
 When I invoke the script from a Enthought Python Compiler in the Windows 
 COM then I got this message:
 
 Traceback (most recent call last):
 File Fluide\script1.py, line 13, in module
 datafile = cbook.get_sample_data('logo.png', asfileobj=False)
 File 
 D:\Programme\Enthought\lib\site-packages\matplotlib-1.0.1_r0-py2.6-win32.egg\matplotlib\cbook.py,
  
 line 676, in get_sample_data
 return myserver.get_sample_data(fname, asfileobj=asfileobj)
 File 
 D:\Programme\Enthought\lib\site-packages\matplotlib-1.0.1_r0-py2.6-win32.egg\matplotlib\cbook.py,
  
 line 623, in get_sample_data
 raise KeyError(msg)
 KeyError: 'file iselogo.png not in cache; received urlopen error [Errno 
 10061] No connection could be made because the target machine actively 
 refused it when trying to retrieve'
 
 Does anyone no a solution for this problem? Image is in the same 
 directory as the script. Or if now I switched to it by os.chdir to the 
 specific path.
 
 Thanks in advance for your help.
 
 Kindly regards,
 Thore Oltersdorf
 
 --
 The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
 Pinpoint memory and threading errors before they happen.
 Find and fix more than 250 security defects in the development cycle.
 Locate bottlenecks in serial and parallel code that limit performance.
 http://p.sf.net/sfu/intel-dev2devfeb
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  --
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Best way to set scales bounds to appropriate values

2011-02-09 Thread Thomas Lecocq

This will do :
 
pyplot.xlim(-5,15)
pyplot.ylim(-5,5)
 
 
HTH.
 
Thomas

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 


Date: Wed, 9 Feb 2011 11:53:17 +0100
From: neur...@gmail.com
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] Best way to set scales bounds to appropriate values

Hi, I'm a matplotlib newbie.


An example is worth a thousand words:



In [1]: matplotlib.__version__ 
Out[1]: '0.99.3'



In [2]: a, b, x = np.zeros(10), np.ones(10), np.arange(10)


In [3]: plot(x, a); plot(x, b)


Well all I see is an empty plot with the two horizontal lines at y=0 and y=1 
covered by the upper and lower frame lines.


Why aren't bounds set a little more larger so the two lines can show properly???
I guess this is a common situation, for example 2 or more stable temperatures: 
the higher and the lower never show...


How can I fix it?


Thanks for your support.
-- 
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: 
Pinpoint memory and threading errors before they happen. Find and fix more than 
250 security defects in the development cycle. Locate bottlenecks in serial and 
parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb
___ Matplotlib-users mailing list 
Matplotlib-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/matplotlib-users   
 --
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Best way to set scales bounds to appropriate values

2011-02-09 Thread Thomas Lecocq

Neurino
 
I'm sure :
 
1° there must be a parameter in the default behaviour of the subplot to control 
taht
2° you can always set xlim( min(X)/2, max(X)/2 ) ...
 
Thomas

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 


Date: Wed, 9 Feb 2011 13:47:01 +0100
Subject: Re: [Matplotlib-users] Best way to set scales bounds to appropriate 
values
From: neur...@gmail.com
To: thlec...@msn.com
CC: matplotlib-users@lists.sourceforge.net

Well, not that automatic...


I wonder why matplotlib takes care of settings limits on data but fails in a 
common situation so I'm forced to override it every time because I don't know 
in advance what data I get...


Thanks anyway.


Cheers
neurino


2011/2/9 Thomas Lecocq thlec...@msn.com


This will do :
 
pyplot.xlim(-5,15)
pyplot.ylim(-5,5)
 
 
HTH.
 
Thomas

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 


Date: Wed, 9 Feb 2011 11:53:17 +0100
From: neur...@gmail.com
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] Best way to set scales bounds to appropriate values




Hi, I'm a matplotlib newbie. 


An example is worth a thousand words:



In [1]: matplotlib.__version__ 
Out[1]: '0.99.3'



In [2]: a, b, x = np.zeros(10), np.ones(10), np.arange(10)


In [3]: plot(x, a); plot(x, b)


Well all I see is an empty plot with the two horizontal lines at y=0 and y=1 
covered by the upper and lower frame lines.


Why aren't bounds set a little more larger so the two lines can show properly???
I guess this is a common situation, for example 2 or more stable temperatures: 
the higher and the lower never show...


How can I fix it?


Thanks for your support.
-- 
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: 
Pinpoint memory and threading errors before they happen. Find and fix more than 
250 security defects in the development cycle. Locate bottlenecks in serial and 
parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb
___ Matplotlib-users mailing list 
Matplotlib-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/matplotlib-users 
  --
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting multi-colored lines atop basemap instances

2011-02-09 Thread Thomas Lecocq

Bruce,





From: br...@clearscienceinc.com
Date: Wed, 9 Feb 2011 09:51:06 -0500
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] Plotting multi-colored lines atop basemap instances

I am attempting to plot a line atop a basemap instance called m.  I can do 
this without a problem with:


plot = m.plot(lon,lat,'r-')  #lon and lat are lists


However, I'd like to color the line based on a third list called intensity.  
For instance, if the value of intensity between two points is 0-35 make it 
green, 35-70 make it yellow, etc.


I have studied this example:  
http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine but I cannot get a 
collection added to the figure without errors.

 
You can always use 'regular' pyplot methods on your plot :
 
fig = plt.figure()
ax = fig.subplot(111)
 
m = Basemap(etc)
 
 
convert your lon/lat to X,Y in the basemap projection: 
X,Y = m(lon,lat)
 
then plot your line as if you were using only pyplot :
 
plt.plot(X,Y) 
 
 
This way, you can add the collection as 
 
ax.add_collection(somecollection)
 
 
HTH,
 
Thomas--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] set ncol for legend

2011-02-08 Thread Thomas Lecocq

Bram,
 
 
fig = plt.figure()
ax = fig.add_subplot(111)
plot1 = plot.plot(X,Y,label='1')
plot2 = plot.plot(X,Y,label='2')
...
plotN = plot.plot(X,Y,label='N')
 
legend = plt.legend(ncol=2)
 
should work...
 
so, for your own_plot_function, you have to return the legend and set it 
accordingly...
 
Thomas
 


**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 


Date: Tue, 8 Feb 2011 11:25:58 +0100
From: sand...@knmi.nl
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] set ncol for legend


Hi, 

I want to update the number of columns in my legend. How should I do that?

I'm looking for something like:

fig = plt.figure()
ax = fig.add_subplot(111)
my_own_plot_function(ax, data)# gives, for example, one column legend by 
default
legend = ax.get_legend()
legend.set_ncol(2)  # something like this 


However, ncol is not in the legend.properties() list for properties to be set 
through legend.set.


Thanks for any help, 
Bram 


-- 
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: 
Pinpoint memory and threading errors before they happen. Find and fix more than 
250 security defects in the development cycle. Locate bottlenecks in serial and 
parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb
___ Matplotlib-users mailing list 
Matplotlib-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/matplotlib-users   
 --
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Autoscale AxesImage after using set_data()

2011-02-08 Thread Thomas Lecocq

Christoph,

this could work ;

img.set_extent([0,200,0,200])

HTH


Thom

**
Thomas Lecocq

Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**



 Date: Tue, 8 Feb 2011 12:56:21 +0100
 From: use...@bersch.net
 To: thlec...@msn.com
 CC: matplotlib-users@lists.sourceforge.net
 Subject: Re: [Matplotlib-users] Autoscale AxesImage after using set_data()
 
 On 08.02.2011 10:23, Thomas Lecocq wrote:
  I would suggest calling requet_redraw() ...
 
 I could not find such a method, nor any similar one: request_redraw() or 
 *_redraw(). I grepped through the version 1.0.1 source code.
 
 Christoph
  --
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] set ncol for legend

2011-02-08 Thread Thomas Lecocq

Bram,





Although I don't quite see the point, I would simply suggest that you 
re-call ax.legend(ncol=2) , that would delete the previous and redraw a 
new one





from matplotlib doc: When the legend command is called, a new legend instance 
is created and old ones are removed from the axes. 








Thomas




**
Thomas Lecocq

Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**



Date: Tue, 8 Feb 2011 14:50:00 +0100
From: sand...@knmi.nl
To: thlec...@msn.com
CC: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] set ncol for legend



  



  
  
I realize that I have not been clear enough. 



I have already created a legend instance in my_own_plot_function,
for example, a legend with one column by default:  



fig = plt.figure()

  ax = fig.add_subplot(111)

  my_own_plot_function(ax, data)# gives, for example, one column
  legend by default



So ax is an axes instance containing the legend. 



Incidentally, after inspecting the automatically created plots, I
want a particular figure to have a two column legend. I would like
to do this without adding an extra kwarg for the number of columns
to my_own_plot_function. It should be possible to do something like
this:



legend = ax.get_legend()

  legend.set_ncol(2)  # something like this 




Once again, thanks for any help!



Bram





On 02/08/2011 12:35 PM, Thomas Lecocq wrote:

  
  Bram,

   

   

  fig = plt.figure()

  ax = fig.add_subplot(111)

  plot1 = plot.plot(X,Y,label='1')

  plot2 = plot.plot(X,Y,label='2')

  ...

  plotN = plot.plot(X,Y,label='N')

   

  legend = plt.legend(ncol=2)

   

  should work...

   

  so, for your own_plot_function, you have to return the legend
  and set it accordingly...

   

  Thomas

   

  

  

  **

  Thomas Lecocq 

  Geologist

  Ph.D.Student (Seismology)

  Royal Observatory of Belgium

  **

  

  

   

  
  Date: Tue, 8 Feb 2011 11:25:58 +0100

  From: sand...@knmi.nl

  To: matplotlib-users@lists.sourceforge.net

  Subject: [Matplotlib-users] set ncol for legend

  

  
  Hi, 

  

  I want to update the number of columns in my legend. How should I
  do that?

  

  I'm looking for something like:

  

  fig = plt.figure()

  ax = fig.add_subplot(111)

  my_own_plot_function(ax, data)# gives, for example, one column
  legend by default

  legend = ax.get_legend()

  legend.set_ncol(2)  # something like this 

  

  

  However, ncol is not in the legend.properties() list for
  properties to be set through legend.set.

  

  

  Thanks for any help, 

  Bram 

  

  

  
--
  The ultimate all-in-one performance toolkit: Intel(R) Parallel
  Studio XE: Pinpoint memory and threading errors before they
  happen. Find and fix more than 250 security defects in the
  development cycle. Locate bottlenecks in serial and parallel code
  that limit performance. http://p.sf.net/sfu/intel-dev2devfeb

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

  --
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problem with projection='3d'

2011-01-28 Thread Thomas Lecocq


From: patbradf
To: matplotlib-users@lists.sourceforge.net
Date: Wed, 26 Jan 2011 22:53:28 -0600
Subject: [Matplotlib-users] Problem with projection='3d'



Forgive me if this is an old question, but I just loaded mplot3d and was 
attempting to work through a couple of the examples on the Matplotlib website.  
The problem is that whenever I try to make a call to a function that requires 
an argument of projection=’3d’ (such as:   ax = fig.add_subplot(111, 
projection='3d')), Python gives me the following error: Traceback (most recent 
call last):  File pyshell#12, line 1, in moduleax = 
fig.add_subplot(111, projection='3d')  File 
C:\Python26\lib\site-packages\matplotlib\figure.py, line 677, in add_subplot  
  projection_class = get_projection_class(projection)  File 
C:\Python26\lib\site-packages\matplotlib\projections\__init__.py, line 61, in 
get_projection_classraise ValueError(Unknown projection '%s' % 
projection)ValueError: Unknown projection '3d'

Check the version of matplotlib you have ! , I suspect a =1.0
HTH
Thom
  --
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to draw a specific country by basemap?

2011-01-27 Thread Thomas Lecocq

Hi, 

that would do:
 
data = m.readshapefile(r'borders\ita_adm1','itaborder',linewidth=0.5)
italy = data[4]
print dir(italy)
italy.set_facecolors('red')
italy.set_alpha(0.5)

 
I think at some point youll meet the limitations of the method, you might need 
to use another shapefile-reading module ...
 
Thom
 

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 


Date: Thu, 27 Jan 2011 17:59:03 +0800
From: eric.l.2...@gmail.com
To: thlec...@msn.com
CC: eric.l.2...@gmail.com; matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] How to draw a specific country by basemap?


On 01/27/2011 01:38 AM, Thomas Lecocq wrote: 


Hi,

An easy way is to use the data from http://www.gadm.org/ and to plot it with 
m.readshapefile()
Thank you very much. The GDAM database is great.

BTW,  would you like to give some suggestions about how to color the map, i.e., 
highlight a specific region?  

Thanks,
Eric



HTH,

Thom

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**





Date: Wed, 26 Jan 2011 16:03:27 +0800
From: eric.l.2...@gmail.com
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] How to draw a specific country by basemap?

Hi all,

I'm using the Basemap module in matplotlib, it's great to draw a world map but 
for a specific country. Empirically, one can draw its own country by specifying 
the lats and longs like this example:

http://matplotlib.sourceforge.net/basemap/doc/html/users/geography.html
And you can use the method: drawcontries() to draw the country boundries, but 
all the countries are in the same colour. Does anyone know how to highlight a 
specific country? Thanks in advance.

Eric
-- 
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/CS/E/MU/P d+(-) s: a- C++ UL$ P+++ L++ E++ W++ N+ o+++ K+++ w !O
M-(+) V-- PS+ PE+ Y+ PGP++ t? 5? X? R+* tv@ b DI-- D G++ e+@ h*
r !y+
--END GEEK CODE BLOCK--
-- 
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a 
world-class log management solution at an even better price-free! Download 
using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure 
your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d
___ Matplotlib-users mailing list 
Matplotlib-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/matplotlib-users 

-- 
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/CS/E/MU/P d+(-) s: a- C++ UL$ P+++ L++ E++ W++ N+ o+++ K+++ w !O
M-(+) V-- PS+ PE+ Y+ PGP++ t? 5? X? R+* tv@ b DI-- D G++ e+@ h*
r !y+
--END GEEK CODE BLOCK--   --
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to draw a specific country by basemap?

2011-01-27 Thread Thomas Lecocq

Hi,
 
Adding some extra work in the readshapefile method in your code allows you to 
play with the region names etc,...
 
I've just made a new tutorial script to show this :
 
http://www.geophysique.be/2011/01/27/matplotlib-basemap-tutorial-07-shapefiles-unleached/
 
 
Thom
 

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 


Date: Thu, 27 Jan 2011 17:59:03 +0800
From: eric.l.2...@gmail.com
To: thlec...@msn.com
CC: eric.l.2...@gmail.com; matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] How to draw a specific country by basemap?

On 01/27/2011 01:38 AM, Thomas Lecocq wrote: 


Hi,

An easy way is to use the data from http://www.gadm.org/ and to plot it with 
m.readshapefile()
Thank you very much. The GDAM database is great.

BTW,  would you like to give some suggestions about how to color the map, i.e., 
highlight a specific region?  

Thanks,
Eric



HTH,

Thom

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**





Date: Wed, 26 Jan 2011 16:03:27 +0800
From: eric.l.2...@gmail.com
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] How to draw a specific country by basemap?

Hi all,

I'm using the Basemap module in matplotlib, it's great to draw a world map but 
for a specific country. Empirically, one can draw its own country by specifying 
the lats and longs like this example:

http://matplotlib.sourceforge.net/basemap/doc/html/users/geography.html
And you can use the method: drawcontries() to draw the country boundries, but 
all the countries are in the same colour. Does anyone know how to highlight a 
specific country? Thanks in advance.

Eric
-- 
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/CS/E/MU/P d+(-) s: a- C++ UL$ P+++ L++ E++ W++ N+ o+++ K+++ w !O
M-(+) V-- PS+ PE+ Y+ PGP++ t? 5? X? R+* tv@ b DI-- D G++ e+@ h*
r !y+
--END GEEK CODE BLOCK--
-- 
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a 
world-class log management solution at an even better price-free! Download 
using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure 
your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d
___ Matplotlib-users mailing list 
Matplotlib-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/matplotlib-users 

-- 
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/CS/E/MU/P d+(-) s: a- C++ UL$ P+++ L++ E++ W++ N+ o+++ K+++ w !O
M-(+) V-- PS+ PE+ Y+ PGP++ t? 5? X? R+* tv@ b DI-- D G++ e+@ h*
r !y+
--END GEEK CODE BLOCK--
-- 
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a 
world-class log management solution at an even better price-free! Download 
using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure 
your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d
___ Matplotlib-users mailing list 
Matplotlib-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/matplotlib-users   
 --
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Extending readshapefile

2011-01-27 Thread Thomas Lecocq

Hi all,

I would like to contribute to a better readshapefile method, who should I 
contact / where should I commit ?

First improvement and partial solution :

* returning a tuple of linecollections per record, with its name and other 
properties.

Cheers,

Thomas

ps : example 
http://www.geophysique.be/2011/01/27/matplotlib-basemap-tutorial-07-shapefiles-unleached/

**
Thomas Lecocq

Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**

  --
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to draw a specific country by basemap?

2011-01-26 Thread Thomas Lecocq

Hi,

An easy way is to use the data from http://www.gadm.org/ and to plot it with 
m.readshapefile()

HTH,

Thom

**
Thomas Lecocq

Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**



Date: Wed, 26 Jan 2011 16:03:27 +0800
From: eric.l.2...@gmail.com
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] How to draw a specific country by basemap?



  




  
  
Hi all,



I'm using the Basemap module in matplotlib, it's great to draw a
world map but for a specific country. Empirically, one can draw its
own country by specifying the lats and longs like this example:

http://matplotlib.sourceforge.net/basemap/doc/html/users/geography.html


And you can use the method: drawcontries() to draw the country
boundries, but all the countries are in the same colour. Does anyone
know how to highlight a specific country? Thanks in advance.



Eric

-- 
-BEGIN GEEK CODE BLOCK-
Version: 3.1
GCM/CS/E/MU/P d+(-) s: a- C++ UL$ P+++ L++ E++ W++ N+ o+++ K+++ w !O
M-(+) V-- PS+ PE+ Y+ PGP++ t? 5? X? R+* tv@ b DI-- D G++ e+@ h*
r !y+
--END GEEK CODE BLOCK--
  


--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users   
  --
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] zorder for individual points in a scatter plot on a Basemap

2010-06-29 Thread Thomas Lecocq

Hi,

 

What about ordering the arrays before plotting ? Are the first elements drawn 
back to front ?

 

Thomas

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 


Date: Mon, 28 Jun 2010 12:55:22 -0400
From: athak...@weatherinnovations.com
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] zorder for individual points in a scatter plot on a 
Basemap

Hi,

I'm currently using a scatter plot on a Basemap and I'd like to set the zorder 
of the individual points based on their temperature.   The higher the 
temperature, the higher the zorder.  Also, i'm  using a colorbar to set the 
colors for the plot.  Here is a snippet of my code:

x = np.array(val)
fig.sca(ax1)
lon_0 =(urcrnrlon+llcrnrlon)/2
lat_0 =(urcrnrlat+llcrnrlat)/2
m = 
Basemap(llcrnrlon=llcrnrlon,llcrnrlat=llcrnrlat,urcrnrlon=urcrnrlon,

urcrnrlat=urcrnrlat,resolution='i',projection='cyl',lon_0=lon_0,lat_0=lat_0)
m.drawcoastlines()
m.drawmapboundary()
m.drawparallels(np.arange(llcrnrlat-1,urcrnrlat+1,5.))
m.drawmeridians(np.arange(llcrnrlon-1,urcrnrlon+1,5.))
m.fillcontinents(color='white',lake_color='aqua')
m.drawcountries(linewidth=1)
lons,lats = m(lon,lat)

#I can do it this way, but this screws up the colorbar
#for i in range(len(x)):
#m.scatter(lons[i],lats[i],c=x[i],marker='o',picker=5,zorder=x[i])  
  
  
m.scatter(lons,lats,c=x,marker='o',picker=5)
plt.title('Time Range: %s to %s'%(startDay.strftime(%b-%d 
%H:%M),endDay.strftime(%b-%d %H:%M)))
plt.colorbar(shrink=0.5)

Is there anyway to set the zorder of the points without using the loop in 
commented code? Any help would be greatly appreciated.

Thanks,

Aman
  --
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Displaying the gradient of an image

2010-06-29 Thread Thomas Lecocq

Hi,

 

You can also use Numpy.gradient to compute the gradient , if e.g. your dx and 
dy aren't the same. 

 

Cheers, 

 

Thom

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 
 Date: Tue, 29 Jun 2010 16:28:11 +0200
 From: mathieu.dub...@limsi.fr
 To: matplotlib-users@lists.sourceforge.net
 Subject: Re: [Matplotlib-users] Displaying the gradient of an image
 
 Hello,
 
 I finally found the solution. It's as simple as:
 figure();
 imshow(img);
 pylab.quiver(U, V, units='x');
 
 Mathieu
 
 --
 This SF.net email is sponsored by Sprint
 What will you do first with EVO, the first 4G phone?
 Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  --
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Axes3D - Equal Aspect Ratio

2009-10-14 Thread Thomas Lecocq

Dear All,

I'm playing around with mpl_toolkits.mplot3d to represent a 3D scatter, but I 
need the axis' aspect to be 'equal'. I tried to :

ax = Axes3D(fig)
ax.set_aspect('equal')

but it doesn't change anything...

Any tips ?

Thanks a lot in advance,

Thomas


**
Thomas Lecocq

Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**

  --
Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Cygwin1.dll error import pyplot

2008-12-02 Thread Thomas Lecocq

Hi all,

I've searched the mailing archive, and I can't find an anwser to my problem :

i'm running Python2.5 on a WinXP32 box. I just reinstalled cygwin to exclude a 
version-problem. Matplotlib version is 0.98.3 (got from easy_install matplotlib 
command)

i'm just trying this :


from matplotlib.pyplot import *

and the answer is :

  3 [main] ? (2808) C:\Python25\pythonw.exe: *** fatal error - Incompatible 
cygwin .dll -- incompatible per_process info 0 != 168

bom...


I really don't know how to solve this...

Thanks a lot in advance for your help !

Thomas


**
Thomas Lecocq

Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Cygwin1.dll error import pyplot

2008-12-02 Thread Thomas Lecocq

All right, 

as information for all :

reinstalling cygwin from scratch, reinstalling python from scratch, and finaly 
matplotlib now works...

Cheers,

Thomas

**
Thomas Lecocq

Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**



From: [EMAIL PROTECTED]
To: matplotlib-users@lists.sourceforge.net
Date: Tue, 2 Dec 2008 12:50:24 +
Subject: [Matplotlib-users] Cygwin1.dll error import pyplot








Hi all,

I've searched the mailing archive, and I can't find an anwser to my problem :

i'm running Python2.5 on a WinXP32 box. I just reinstalled cygwin to exclude a 
version-problem. Matplotlib version is 0.98.3 (got from easy_install matplotlib 
command)

i'm just trying this :


from matplotlib.pyplot import *

and the answer is :

  3 [main] ? (2808) C:\Python25\pythonw.exe: *** fatal error - Incompatible 
cygwin .dll -- incompatible per_process info 0 != 168

bom...


I really don't know how to solve this...

Thanks a lot in advance for your help !

Thomas


**
Thomas Lecocq

Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users