[matplotlib-devel] Ten Simple Rules for Better Figures (update)

2014-09-27 Thread Nicolas P . Rougier

Now in Nature as well:
http://www.nature.com/news/how-to-dodge-the-pitfalls-of-bad-illustrations-1.15999

Nicolas

> 
> Hi all,
> 
> I'm very pleased to announce the publication of a paper I've written with 
> Michael Droettboom and Philip E. Bourne.
> 
> Ten Simple Rules for Better Figures
> Nicolas P. Rougier, Michael Droettboom, Philip E. Bourne
> PLOS Computational Biology
> URL: http://www.ploscompbiol.org/article/info:doi/10.1371/journal.pcbi.1003833
> 
> 
> All the figures have been made using matplotlib and sources are available 
> from:
> 
> https://github.com/rougier/ten-rules
> 
> We even managed to use the XKCD filter !
> Thanks a lot for this great library.
> 


--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] trouble installing matplotlib on redhat

2014-09-27 Thread Andy Davidson
Hi

I am new to python and matplotlib. I have a little script that works fine on
my mac. How ever it does not run on my amazon ec2 cluster. I am basically
running a version of redhead. I have been able to install most of the
dependencies how ever I can not figure out to install libagg, free type, or
qhull. I tried using yum how ever this did not work.

Any suggestions would be greatly appreciated

Andy

sudo pip2.7 install six

sudo pip2.7 install python-dateutil

sudo pip2.7 install pyparsing

sudo pip2.7 install pycxx





ec2-user@ip-172-31-15-87 root]$ sudo pip2.7 install matplotlib

Downloading/unpacking matplotlib

  Downloading matplotlib-1.4.0.tar.gz (51.2MB): 51.2MB downloaded

  Running setup.py (path:/tmp/pip_build_root/matplotlib/setup.py) egg_info
for package matplotlib




Edit setup.cfg to change the build options



BUILDING MATPLOTLIB

matplotlib: yes [1.4.0]

python: yes [2.7.5 (default, Sep 15 2014, 17:30:20)
[GCC

4.8.2 20140120 (Red Hat 4.8.2-16)]]

  platform: yes [linux2]



REQUIRED DEPENDENCIES AND EXTENSIONS

 numpy: yes [version 1.9.0]

   six: yes [using six version 1.8.0]

  dateutil: yes [using dateutil version 2.2]

   tornado: yes [using tornado version 4.0.2]

 pyparsing: yes [using pyparsing version 2.0.2]

 pycxx: yes [Couldn't import.  Using local copy.]

libagg: yes [pkg-config information for 'libagg' could
not

be found. Using local copy.]

  freetype: no  [Requires freetype2 2.4 or later.  Found

2.3.11.]

   png: yes [version 1.2.49]

 qhull: yes [pkg-config information for 'qhull' could
not be

found. Using local copy.]



OPTIONAL SUBPACKAGES

   sample_data: yes [installing]

  toolkits: yes [installing]

 tests: yes [using nose version 1.3.4 / mock is required
to

run the matplotlib test suite.  pip/easy_install
may

attempt to install it after matplotlib.]

toolkits_tests: yes [using nose version 1.3.4 / mock is required
to

run the matplotlib test suite.  pip/easy_install
may

attempt to install it after matplotlib.]



OPTIONAL BACKEND EXTENSIONS

macosx: no  [Mac OS-X only]

qt5agg: no  [PyQt5 not found]

qt4agg: no  [PyQt4 not found]

pyside: no  [PySide not found]

   gtk3agg: no  [Requires pygobject to be installed.]

 gtk3cairo: no  [Requires cairocffi or pycairo to be
installed.]

gtkagg: no  [Requires pygtk]

 tkagg: no  [TKAgg requires Tkinter.]

 wxagg: no  [requires wxPython]

   gtk: no  [Requires pygtk]

   agg: yes [installing]

 cairo: no  [cairocffi or pycairo not found]

 windowing: no  [Microsoft Windows only]



OPTIONAL LATEX DEPENDENCIES

dvipng: no

   ghostscript: yes [version 8.70]

 latex: yes [version 3.141592]

   pdftops: no






* The following required packages can not be
built:

* freetype

Complete output from command python setup.py egg_info:






Edit setup.cfg to change the build options







BUILDING MATPLOTLIB



matplotlib: yes [1.4.0]



python: yes [2.7.5 (default, Sep 15 2014, 17:30:20)  [GCC



4.8.2 20140120 (Red Hat 4.8.2-16)]]



  platform: yes [linux2]







REQUIRED DEPENDENCIES AND EXTENSIONS



 numpy: yes [version 1.9.0]



   six: yes [using six version 1.8.0]



  dateutil: yes [using dateutil version 2.2]



   tornado: yes [using tornado version 4.0.2]



 pyparsing: yes [using pyparsing version 2.0.2]



 pycxx: yes [Couldn't import.  Using local copy.]



libagg: yes [pkg-config information for 'libagg' could not



be found. Using local copy.]



  freetype: no  [Requires freetype2 2.4 or later.  Found



2.3.11.]



   png: yes [version 1.2.49]



 qhull: yes [pkg-config information fo

[matplotlib-devel] pyplot-OO convergence

2014-09-27 Thread Eric Firing
One of the biggest causes of controversy in mpl, and of difficulty in 
teaching and learning mpl, is the divide between pyplot and the rest of 
the library.  There are at least two aspects:

1) plt.title() versus ax.set_title(), etc; that is, all the clunky 
getters and setters on the OO side.  JDH used to note that they were a 
side-effect of his C++ heritage, and that he probably wouldn't have used 
them if he had had more Python experience when he started mpl.

2) For interactive use, such as in the ipython console, one really wants 
pyplot's draw_if_interactive() functionality; one doesn't want to have 
to type explicit plt.draw() commands.  Worse, plt.draw() operates on the 
current figure, which might not be the figure that one just updated with 
"ax2.set_title('the other plot')".

I think that both of these speed bumps can be removed fairly easily, in 
an entirely backwards-compatible way.

The first is just a matter of propagating some shorter-form pyplot 
function names back to Axes and Figure.  This idea is mentioned at the 
end of MEP 13, as an alternative to properties.

The second requires accepting some behavior in the Axes and Figure 
classes that is conditional on the backend and the interactive state.  I 
think it would look *roughly* like this:

Add a method to Figure:

def draw_if_interactive():
 if not is_interactive:
 return
 if not isinstance(self.canvas, interactive_canvases):
 return
 self.canvas.draw()

Append this method to suitable Figure methods such as suptitle().

Add a method to Axes:

def draw_if_interactive():
 self.figure.draw_if_interactive()

Append this method to suitable Axes methods--all those that execute 
changes, or at least those with corresponding pyplot functions.

Some additional logic (either a kwarg, or temporary manipulation of the 
"interactive" flag, or of an Axes instance flag) would be needed to 
block the drawing at intermediate stages--e.g., when boxplot is drawing 
all its bits and pieces.

After these changes, the pyplot functions could be simplified; they 
would not need their own draw_if_interactive calls.

Am I missing some major impediment?  If not, I think this set of changes 
would make it much easier to use and teach the OO interface, with pyplot 
still being used where it is most helpful, such as in the subplots() call.

Eric

--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel