<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.python.matplotlib.general">
    <title>gmane.comp.python.matplotlib.general</title>
    <link>http://blog.gmane.org/gmane.comp.python.matplotlib.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30663"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30656"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30655"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30650"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30647"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30640"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30635"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30632"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30631"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30630"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30629"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30622"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30619"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30616"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30615"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30614"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30612"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30609"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30607"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30602"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30663">
    <title>Dark or inverted color scheme</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30663</link>
    <description>&lt;pre&gt;Is there a simple way to essentially invert the default plotting color
scheme so that the figure background is black and all text, ticks,
axes, axis labels, etc are white?  I think what I want is to redefine
the RGB definitions of the standard color values 'b', 'y', 'k', etc so
that I can make a plot figure with a black background using the same
script as one for the normal white background.

A spent a little while googling and didn't find anything apart from
specifically setting different colors for every single plot element.
This would be tiresome.

Thanks in advance for any help,
Tom

------------------------------------------------------------------------------
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/
&lt;/pre&gt;</description>
    <dc:creator>Tom Aldcroft</dc:creator>
    <dc:date>2012-05-25T20:07:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30656">
    <title>griddata is not working after update to Python2.7</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30656</link>
    <description>&lt;pre&gt;Dear All,

I used to use griddata in order to make my contourmaps. However, after I updated
my Python from 2.6 to 2.7 griddata is not working anymore.

I tried some workarounds but no success.

The countourmap that I produced before is here.
http://dl.dropbox.com/u/17983476/matplotlib/contour_dT_workingbefore.png

After the Python 2.7 update, it turns to the following.
http://dl.dropbox.com/u/17983476/matplotlib/contour_dT_broken.png

Here is the datafile.
http://dl.dropbox.com/u/17983476/matplotlib/contour_dT.dat

And the associated python script (which is also below).
http://dl.dropbox.com/u/17983476/matplotlib/contour_dT.py

The code that I was using before is here. I had to comment out #import griddata
line because this is the only way that it continues. Is this a bug in griddata,
or if there are new workarounds, I would be glad to know a new method to produce
my contourplots again.

Thanks a lot

----------------------------
#! /usr/bin python

import os
import sys
import math
from math import *
from numpy import *
#import griddata
from pylab import *
from matplotlib.ticker import FormatStrFormatter
params = {'axes.labelsize': 20,
'text.fontsize': 15,
'legend.fontsize': 14,
'xtick.labelsize': 20,
'ytick.labelsize': 20,
'text.usetex': True }
rcParams.update(params)

par1 = []
par2 = []
chis = []

rfile = file('contour_dT.dat','r')
line = rfile.readline()
data = line.split()

while len(data) &amp;gt;1:
par1.append(float(data[0]))
par2.append(float(data[1]))
chis.append(float(data[2]))
line = rfile.readline()
data = line.split()

par1 = array(par1)
par2 = array(par2)
chis = array(chis)

xi = linspace(3.2,7.8,50)
yi = linspace(15,300,50)
zi = griddata(par2,par1,chis,xi,yi)
levels = [0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.2,1.5,2,3,4,6,10,12,15,20,25,30,40,50]
CS = contourf(xi,yi,zi,levels,cmap=cm.jet)
CS2 = contour(CS, levels=CS.levels[::2],
                        colors = 'r',
                        hold='on')

cbar = colorbar(CS)
cbar.add_lines(CS2)

savefig("contour_dT.png")
show()



------------------------------------------------------------------------------
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/
&lt;/pre&gt;</description>
    <dc:creator>Umut Yildiz</dc:creator>
    <dc:date>2012-05-24T19:10:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30655">
    <title>plotting through ipython and QT4 custom widgets</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30655</link>
    <description>&lt;pre&gt;Hi,

I want to add a QT4 widget to a matplotlib figure, but the widget does not
react to user input.

Here it is a test case:

from PyQt4 import QtGui, QtCore
from pylab import *

def test():
    plot([1,2,3], lw=2)
    qt4_interface(gcf())

class qt4_interface:
    def __init__(self,fig):
        QMainWin = fig.canvas.parent()
        toolbar = QtGui.QToolBar(QMainWin)
        QMainWin.addToolBar(QtCore.Qt.BottomToolBarArea, toolbar)

        self.line_edit = QtGui.QLineEdit(parent=toolbar)
        self.line_edit.editingFinished.connect(self.do_something)
        toolbar.addWidget(self.line_edit)

    def do_something(self, *args):
        f = open('l','a'); f.write('yes\n'); f.flush(); f.close()
        #close()

I run the script as "run -i qt4_test.py" from ipython. Then running test()
I get the figure with the additional widget but the do_something method is
never called.

Incidentally if I do a plot from ipython and then I type interactively
qt4_interface(gcf()), the qt4 widget is added to the figure and works
properly.

Any hints on how can I resolve this problem?

BTW, I'm running matplotlib official package (1.0.1) included in ubuntu
11.10.

Thanks,
Antonio
------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>AI</dc:creator>
    <dc:date>2012-05-24T19:03:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30650">
    <title>Easy mistake to make...</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30650</link>
    <description>&lt;pre&gt;Just got bit by this and I thought I'd share to help others.

I was just quickly writing out some pyplot commands to create two subplots
to compare some results.  I did:

plt.subplots(1, 2, 1)
plt.contourf(....)
plt.title("Contours")
xlim = plt.xlim()
ylim = plt.ylim()

plt.subplots(1, 2, 2)
plt.imshow(....)
plt.title("Raw Image")
plt.xlim(xlim)
plt.ylim(ylim)


Did you see the error?  I did "subplots" instead of "subplot".  Since the
third argument for plt.subplot is "sharex", a value of 1 or 2 appears
perfectly valid to it. Meanwhile, the second call to plt.subplots() throws
out my first subplot, and I also get the seemingly odd behavior of the
first subplot having the correct x limits, but the default y limits (0,
1).  Of course, this makes sense once you figure out the issue, but it is
an extra wrinkle that can be quite confusing.

I suspect this is a very easy mistake to make.  Should we perhaps test the
value of sharex in subplots() and warn if it is anything but a python
bool?  Just a thought.

Cheers!
Ben Root
------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Benjamin Root</dc:creator>
    <dc:date>2012-05-24T13:54:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30647">
    <title>(no subject)</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30647</link>
    <description>&lt;pre&gt;http://paulaslominska.cba.pl/lnjysgcpta/395506.html------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Arek Kedzior</dc:creator>
    <dc:date>2012-05-24T04:03:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30640">
    <title>how to set figure to appear on another monitor?</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30640</link>
    <description>&lt;pre&gt;Dear all,

I have two different monitors. How can I use plot command within terminal
in this monitor and set the figure to show defaultly in another one?

thanks,

Chao

&lt;/pre&gt;</description>
    <dc:creator>Chao YUE</dc:creator>
    <dc:date>2012-05-23T14:32:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30635">
    <title>TypeError: coercing to Unicode: need string orbuffer, dict found</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30635</link>
    <description>&lt;pre&gt;Hi,

Anyone know how to solve this error?

Exception Type: TypeError Exception Value: coercing to Unicode: need string
or buffer, dict found

Can you help me??

See mycode: http://dpaste.com/751460/

And see my Traceback: http://dpaste.com/750773/


Thanks,
------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Waléria Antunes David</dc:creator>
    <dc:date>2012-05-23T12:16:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30632">
    <title>Resizing a PyQt based mpl window</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30632</link>
    <description>&lt;pre&gt;Hi,

I have attached a small example displaying a simple plot in a PyQt based 
widget. If you start resizing the widget manually, the labels of the 
axes as well as the title disappear from the plot window even for 
moderately small window sizes.

Any suggestions on how I can fix this?

Best regards,

Mads

&lt;/pre&gt;</description>
    <dc:creator>Mads Ipsen</dc:creator>
    <dc:date>2012-05-23T08:58:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30631">
    <title>barchart errorbars always in both directions</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30631</link>
    <description>&lt;pre&gt;Hi,

I'm following the example in the gallery to do a barchart plot (see
http://matplotlib.sourceforge.net/examples/api/barchart_demo.html ).

In contrast to the example I would like to see the error bars only above
the bars, so I tried

rects2 = ax.bar(ind+width, womenMeans, width, color='y',
                yerr=stds, error_kw = {'barsabove': True,
                                       'ecolor'   : 'k'}

While the 'ecolor' argument gets accepted, 'barsabove' apparently has no
effect (error bars still point up and downwards) - yet, no warning /
error is triggered. Where is my mistake? Or is this a bug (still using
version 1.0.1) with a known work-around?

TIA
Chris

------------------------------------------------------------------------------
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/
&lt;/pre&gt;</description>
    <dc:creator>Meesters, Aesku.Kipp Institute</dc:creator>
    <dc:date>2012-05-23T08:03:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30630">
    <title>Slow imshow when zooming or panning with severalsynced subplots</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30630</link>
    <description>&lt;pre&gt;I'm plotting several images at once, sharing axes, because I use it
for exploratory purposes. Each image is the same satellite image at
different dates. I'm experimenting a slow response from matplotlib
when zooming and panning, and I would like to ask for any tips that
could speed up the process.

What I am doing now is:
    - Load data from several netcdf files.
    - Calculate maximum value of all the data, for normalization.
    - Create a grid of subplots using ImageGrid. As each subplot is
generated, I delete the array to free some memory (each array is
stored in a list, the "deletion" is just a list.pop()). See the code
below.

It's 15 images, single-channel, of 4600x3840 pixels each. I've noticed
that the bottleneck is not the RAM (I have 8 GB), but the processor.
Python spikes to 100% usage on one of the cores when zooming or
panning (it's an Intel(R) Core(TM) i5-2500 CPU &amp;lt; at &amp;gt; 3.30GHz, 4 cores, 64
bit).

The code is:
-------------------------------------------
import os
import sys

import numpy as np
import netCDF4 as ncdf
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid
from matplotlib.colors import LogNorm

MIN = 0.001 # Hardcoded minimum data value used in normalization

variable = 'conc_chl'
units = r'$mg/m^3$'
data = []
dates = []

# Get a list of only netCDF files
filelist = os.listdir(sys.argv[1])
filelist = [f for f in filelist if os.path.splitext(f)[1] == '.nc']
filelist.sort()
filelist.reverse()

# Load data and extract dates from filenames
for f in filelist:
    dataset = ncdf.Dataset(os.path.join(sys.argv[1],f), 'r')
    data.append(dataset.variables[variable][:])
    dataset.close()
    dates.append((f.split('_')[2][:-3],f.split('_')[1]))

# Get the maximum value of all data. Will be used for normalization
maxc = np.array(data).max()

# Plot the grid of images + dates
fig = plt.figure()
grid = ImageGrid(fig, 111,\
        nrows_ncols = (3, 5),\
        axes_pad = 0.0,\
        share_all=True,\
        aspect = False,\
        cbar_location = "right",\
        cbar_mode = "single",\
        cbar_size = '2.5%',\
        )
for g in grid:
    v = data.pop()
    d = dates.pop()
    im = g.imshow(v, interpolation='none', norm=LogNorm(), vmin=MIN, vmax=maxc)
    g.text(0.01, 0.01, '-'.join(d), transform = g.transAxes) # Date on a corner
cticks = np.logspace(np.log10(MIN), np.log10(maxc), 5)
cbar = grid.cbar_axes[0].colorbar(im)
cbar.ax.set_yticks(cticks)
cbar.ax.set_yticklabels([str(np.round(t, 2)) for t in cticks])
cbar.set_label_text(units)

# Fine-tune figure; make subplots close to each other and hide x ticks for
# all
fig.subplots_adjust(left=0.02, bottom=0.02, right=0.95, top=0.98,
hspace=0, wspace=0)
grid.axes_llc.set_yticklabels([], visible=False)
grid.axes_llc.set_xticklabels([], visible=False)

plt.show()
-------------------------------------------

Any clue about what could be improved to make it more responsive?

PD: This question has been posted previously on Stackoverflow, but it
hasn't got any answer:
http://stackoverflow.com/questions/10635901/slow-imshow-when-zooming-or-panning-with-several-synced-subplots

------------------------------------------------------------------------------
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/
&lt;/pre&gt;</description>
    <dc:creator>Sergi Pons Freixes</dc:creator>
    <dc:date>2012-05-23T08:11:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30629">
    <title>Difference in show and output file</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30629</link>
    <description>&lt;pre&gt;
Dear All,

I am trying to write a program in matplotlib to generate stacked bar graphs.
My problem is that the commands -  plt.show() and self.fig.savefig(fileName)
generate different outputs.
I tried different output formats like PDF, PNG, EPS. But the problem remains
the same.
This happens for the lines that I am trying to draw outside the plot.
I am trying to draw vertical lines between xticklabels.
I have uploaded the data file and the code file.
http://old.nabble.com/file/p33893817/data.dat data.dat 
http://old.nabble.com/file/p33893817/matplot1.py matplot1.py 
Could anyone explain how to resolve this problem?

Thank You,
Raj
&lt;/pre&gt;</description>
    <dc:creator>rajtendulkar</dc:creator>
    <dc:date>2012-05-23T06:57:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30622">
    <title>plt.close() not releasing memory? Or memory leakelsewhere?</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30622</link>
    <description>&lt;pre&gt;Hi All.

I'm experiencing some memory issues with some python/matplotlib code. I have a large object/class containing a lot of data, and whilst using that object to create (about 30) graphs I keep running into memory errors. Here is a description of my problem:

Firstly, I am able to create each graph individually. So if I run each graph creation function individually in the interpreter I get the desired result:

MyClass.TypicalPlot(save=True, show = False)

However, if I create a new function to run each graph function in a script then I get a "MemoryError: Could not allocate memory for path". (varies at the precise point where, but its normally after 3 or 4 graphs). I am able to run each plot function in an interpreter without issue, so I can only assume its some kind of memory/garbage collection issue.


def saveAllPlots(self, comments = False):

        if self.comment is None: comment = False
        else: comment = True
        self.TypicalPlot(save=True, show=False, comment=comment)
        self.AnotherPlot(save=True, show=False)
        self.AnotherPlot2(save=True, show=False)
        self.AnotherPlot3(save=True, show=False)
        ...etc, etc, etc

Here is what a typical plot function looks like in my code (they are all very similar)


def TypicalPlot(self, title=None, comment=False, save=False, show=True):

    if title is None:
        title = self.dat.title

    fig = plt.figure()
    host = SubplotHost(fig, 111)
    fig.add_subplot(host)
    par = host.twinx()
    host.set_xlabel("Time (hrs)")
    host.set_ylabel("Power (W)")
    par.set_ylabel("Temperature (C)")
    p1, = host.plot(self.dat.timebase1, self.dat.pwr, 'b,', label="Power",
                    markevery= self.skip)
    p2, = par.plot(self.dat.timebase2, self.dat.Temp1, 'r,',
                   label="Temp 1", markevery= self.skip)
    p3, = par.plot(self.dat.timebase2, self.dat.Temp2, 'g,',
                   label="Temp 2", markevery= self.skip)
    p4, = par.plot(self.dat.timebase2, self.dat.Temp3, 'm,',
                   label="Temp 3", markevery= self.skip)
    host.axis["left"].label.set_color(p1.get_color())
    # par.axis["right"].label.set_color(p2.get_color())
    #host.legend(loc='lower left')
    plt.title(title+" Temperature")

    leg=host.legend(loc='lower left',fancybox=True)
    #leg.get_frame().set_alpha(0.5)
    frame  = leg.get_frame()
    frame.set_facecolor('0.80')

    ### make the legend text smaller
    for t in leg.get_texts():
        t.set_fontsize('small')

    ### set the legend text color to the same color as the plots for added
    ### readability
    leg.get_texts()[0].set_color(p1.get_color())
    leg.get_texts()[1].set_color(p2.get_color())
    leg.get_texts()[2].set_color(p3.get_color())
    leg.get_texts()[3].set_color(p4.get_color())

    if show is True and save is True:
        plt.show()
        plt.savefig('temp.png')
    elif show is True and save is False:
        plt.show()
    elif show is False and save is True:
        plt.savefig('temp.png')
        plt.clf()
        plt.close(fig)

Has anyone come across this before?

Regards,

Sam Stevenson

------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Stevenson, Samuel</dc:creator>
    <dc:date>2012-05-22T08:10:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30619">
    <title>Turning of ticks in matplotlibrc</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30619</link>
    <description>&lt;pre&gt;Hi everybody.
I have been trying to turn off xticks and yticks and their labels in 
matplotlibrc.
Ticks 
&amp;lt;http://matplotlib.sourceforge.net/api/axis_api.html#matplotlib.axis.Tick&amp;gt; 
have an argument "tick1On" and "label1On" but it seems I can not use these
in the config file. Is that correct?
Is there any other way to turn of ticks by default?

Thanks,
Andy
------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Andreas Mueller</dc:creator>
    <dc:date>2012-05-21T20:01:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30616">
    <title>Contour-like line labels on line plots.</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30616</link>
    <description>&lt;pre&gt;Greetings all,

I am trying to place line labels on a plot similar to how contours in a
contour plot are labeled (i.e. clabel). I have found that I can use
ax.annotate but have to optimize by hand while the clabel for contours
finds a "good" location without my having to find it. Is this feature
available?

Regards,
Brian
------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Brian</dc:creator>
    <dc:date>2012-05-21T16:33:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30615">
    <title>strange behaviour with sankey diagram (maybe abug)</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30615</link>
    <description>&lt;pre&gt;
  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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Giovanni</dc:creator>
    <dc:date>2012-05-21T15:39:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30614">
    <title>how to remove colorbar?</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30614</link>
    <description>&lt;pre&gt;Dear all,

Is there a way to remove colorbar? axes.cla() clears only the region for
map but not the colorbar.

Chao

&lt;/pre&gt;</description>
    <dc:creator>Chao YUE</dc:creator>
    <dc:date>2012-05-21T12:17:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30612">
    <title>modify default figure dpi when saving figureinteractivley</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30612</link>
    <description>&lt;pre&gt;Dear all,

I have a question on how to change default figure dpi when try to save
figure in interactive mode.
I try to use mat.rcParams['figure.dpi']=300 before I plot, then the problem
is that the figure which is drawn is too big for interactive check (maybe
because of increase in dpi).
the mat.rcParams['figure.figsize'] is still default [8,6]. The other option
is that always use fig=gcf(); and fig.savefig('my_plot.jpg', dpi=300).
I am suing 'Agg' backend on ubuntu system.

thanks et cheers,

Chao
&lt;/pre&gt;</description>
    <dc:creator>Chao YUE</dc:creator>
    <dc:date>2012-05-21T07:45:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30609">
    <title>Problem/Bug with Text rendering With LaTeX</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30609</link>
    <description>&lt;pre&gt;Hi,

mpl is a great package. Thanks for the effort first!

Recently I have tried to use latex to render all the texts in a plot for
consistent look with other texts in a paper. However, it seems that all the
texts in the plot are rendered in bold font. Please see the attached code.

==
#!/opt/local/bin/python
from matplotlib.pyplot import *
from matplotlib import rc
rc('text', usetex=True)
rc('font', family='serif')

text(.1, .2, r'first $f(x,y)=x+y\ \mathrm{first}\ \mathbf{first}\
\textrm{first}\ \textnormal{first}$')
xlabel(r'first $f(x,y)=x+y\ \mathrm{first}\ \mathbf{first}\ \textrm{first}\
\textnormal{first}$')

savefig('test_tex.pdf', transparent=True)
==

The text in 1) normal environment (quoted in r'text'), 2) in \textrm{}, 3)
\textnormal{} are the same with 4) \mathbf{}. The only way to produce with
"normal" font is to put the text in \mathrm{}.

The matplotlibrc is default or blank. I was able to reproduce the result
with versions 1.1.0 and 1.1.1 on both linux and mac. And I couldn't find a
quick fix from the internet.

Furthermore, I found that the texts in the tutorial page
http://matplotlib.sourceforge.net/users/usetex.html are also bolded: "TeX
is Number ..." is thicker than the font in the following equation and the
tics labels, whose "normal" font can be seen by putting them in \mathrm{}.

It is quite annoying to have inconsistent font in the figure and the main
texts. Could someone look into it? Thanks a million!

A Spherical Chicken
------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Yang Zhang</dc:creator>
    <dc:date>2012-05-20T22:14:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30607">
    <title>Creating a log-frequency spectrogram</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30607</link>
    <description>&lt;pre&gt;I was wondering whether this feature has been built-in via specgram (maybe
needs a transformation) or if somebody has wrote something to easily
implement. If not, the current best method of going about it as I don't see
it in the documentation.

Cheers,
Jeff
------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Jeffrey Spencer</dc:creator>
    <dc:date>2012-05-20T06:43:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30602">
    <title>ANN: basemap toolkit 1.0.3</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30602</link>
    <description>&lt;pre&gt;Available for download at 
https://sourceforge.net/projects/matplotlib/files/matplotlib-toolkits/basemap-1.0.3/

Thanks to Christoph Gohlke for making windows installers.

Highlights:
   - new 'round' keyword for polar-centric plots (see polarmaps.py example).
   - the coastline filling bug has now finally been (mostly) fixed 
(there are still probably
     some corner cases that trigger it).
   - coastline and political boundary databases updated.
   - examples now work in python 3
   - added hexbin and streamplot methods.
   - added kav7 (Kavrayskiy VII) and eck4 (Eckert IV) projections.
     - UTM zones can now be plotted (see utmtest.py example).
     - many bug fixes.


full Changelog:

version 1.0.3 (git tag v1.0.3rel)
--------------------------------
* fix some more python 3 compatibility issues (all examples now
   work with python 3.2).
* added alpha keyword to fillcontinents (to set transparency).
* update geos from 3.3.1 to 3.3.3.
* upgrade proj4 source to version 4.8.0, pyproj to version 1.9.2.
* add k_0 keyword for projection = 'tmerc' so UTM zones can be
   created. Also can be used with 'lcc','omerc' and 'stere'.
   Added "utmtest.py" example.
* add streamplot method, along with streamplot_demo.py example.
* add boundarylats, boundarylons Basemap attributes (arrays
   describing map boundaries - useful for illustrating map projection
   region on another map). Example illustrating usage
   (make_inset.py) added.
* update coastlines, rivers, political boundaries to GSHHS
   2.2.0/GMT 4.5.7. The fillcontinents bug (filling the outside
   instead of the inside of a coastline polygon) is now much
   harder to trigger.
* add 'round' keyword keyword to Basemap.__init__ for pole-centered
   projections to make them round (clipped at boundinglat) instead
   of square.
* added hexbin method, along with hexbin_demo.py example.
* drawmapboundary now uses axes bgcolor as default fill_color. If
   no color fill wanted, set fill_color='none' (a string).
* clip coastlines for nplaea,npaeqd,splaea,spaeqd in stereographic
   coordinates to avoid S. America disappearing in some south polar
   plots.
* fix broken daynight terminator function.
* added kav7 (Kavrayskiy VII) and eck4 (Eckert IV) projections
   (https://github.com/matplotlib/basemap/issues/9).
* update pyproj source from pyproj.googlecode.com. Includes
   new more robust and accurate pure python code for geodesic computations
   from geographiclib.
* bug fixes for celestial projections, and non-standard sphere
   radii (https://github.com/matplotlib/basemap/pull/6).
* fix bug in drawparallels that results in 'KeyError' when drawing
   parallels very close together (0.1 degrees).
* fix constant in Robinson projection (update PJ_robin.c
   from proj4 svn).
* fix typo in setup.py (replace "!= ['sdist','clean']" with
   "not in ['sdist','clean']").
* make sure drawmeridians can handle wrap-around (so that
   if projection is defined in -180 to 0 and user asks for
   meridians from 180 to 360 to be drawn, it should work).
   Only affects projections 'mill','gall','merc' and 'cyl'.

Regards,

Jeff

&lt;/pre&gt;</description>
    <dc:creator>Jeff Whitaker</dc:creator>
    <dc:date>2012-05-18T20:46:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.matplotlib.general/30601">
    <title>hexbin difference map</title>
    <link>http://comments.gmane.org/gmane.comp.python.matplotlib.general/30601</link>
    <description>&lt;pre&gt;Any hints on how to visualize the density difference between two hexbin
plot, each with x-y (2D) data?

Each set has roughly 300,000 points.
The range in x and y values for each data set are roughly similar but with
slightly different density:
range x,x1: -1.222 to 3.656
range y,y1: 13.191, 18.150

So the steps:

(1) Produce the two hexbin maps:

fig1=hexbin(c_b204_jmk,c_b204_k,C = None, gridsize = 100, bins = None,
xscale = 'linear', yscale = 'linear', cmap=None, norm=None, vmin=None,
vmax=None, alpha=None, linewidths=None, edgecolors='none',reduce_C_function
= np.mean, mincnt=None, marginals=False)

fig2=hexbin(c_b211_jmk,c_b211_k,C = None, gridsize = 100, bins = None,
xscale = 'linear', yscale = 'linear', cmap=None, norm=None, vmin=None,
vmax=None, alpha=None, linewidths=None, edgecolors='none',reduce_C_function
= np.mean, mincnt=None, marginals=False)

(2) Determine the difference in the hexbin counts, with

diff_hex=fig2.get_array()-fig1.get_array()


(3) BUT when i try to plot the diff hexbin map

fig3=hexbin(c_b211_jmk,c_b211_k,C = diff_hex, gridsize = 100, bins = None,
xscale = 'linear', yscale = 'linear', cmap=None, norm=None, vmin=None,
vmax=None, alpha=None, linewidths=None, edgecolors='none',reduce_C_function
= np.mean, mincnt=None, marginals=False)

I obviously get a:
IndexError: index out of bounds

Because:
len(c_b211_jmk) = len(c_b211_k)  != len(diff_hex),
Since diff_hex are the binned counts.

(4) Any simple way to get around this, to plot the hexbin difference counts
on top of the the  hexbin (c_b211_jmk,c_b211_k) distribution?

thanks in advance &amp;amp; with best regards,
- Sebastian
------------------------------------------------------------------------------
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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
&lt;/pre&gt;</description>
    <dc:creator>Sebastian</dc:creator>
    <dc:date>2012-05-18T20:11:45</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.matplotlib.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.matplotlib.general</link>
  </textinput>
</rdf:RDF>

