[Matplotlib-users] Matplotlib and latex using different typewriter font

2012-08-15 Thread Mogliii
I get the attached result. The \texttt{} is rendered differently by
matplotlib and latex.

I am using the default latex fonts, and below is my preamble.

rc('font', **{'family':'serif', 'serif':['Computer Modern Roman']})
params = {'backend': 'pdf',
  'axes.labelsize': 12,
  'text.fontsize': 12,
  'legend.fontsize': 12,
  'xtick.labelsize': 10,
  'ytick.labelsize': 10,
  'text.usetex': True,
  'figure.figsize': fig_size,
  'axes.unicode_minus': True}
matplotlib.rcParams.update(params)



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


[Matplotlib-users] Saving figure instance for reuse

2012-08-15 Thread Jesper Larsen
Hi Matplotlib users

I have an application where performance is critical and matplotlib is
the performance bottleneck. I am making a lot of figures using the
same basic setup of the figure. And from my profiling I can see that
this basic setup accounts for most of the CPU time. Let us say that I
make a given figure including some axes. My questions are:

1. Can I make a copy of this figure including axes (copy.deepcopy does
not work on Figure objects) and use the copy for plotting on?

2. And how? Should I use the frozen method somehow?

I did do something similar some years back. But at the time I removed
the stuff I had drawn on the figure. I would like to avoid this for
two reasons: 1) Thread safety, I must be able to draw figures in
several simultaneous threads and 2) I really had to go into some
low-level details in matplotlib (not a show-stopper, but for
maintenance reasons I would like to keep the code as clear as
possible).

Best regards,
Jesper

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


Re: [Matplotlib-users] NavigationToolbar2WxAgg Buttons Disappear

2012-08-15 Thread Benjamin Root
On Wednesday, August 15, 2012, David Grudoski wrote:

> Hi All,
> I've encountered this problem with the both NavigationToolbar2Wx and the
> NavigationToolbar2WxAgg.
> When I click the Zoom or Pan button the button disappears. The
> functionality is maintained so if a click the location that the button used
> to be displayed at the toggle action still works its just that the button
> is no longer displayed.
> Can any one help me fix this?
> Thanks
> David


Which version of matplotlib are you using?

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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib and latex using different typewriter font

2012-08-15 Thread mogliii

  
  
On 15/08/2012 09:56, Mogliii wrote:


  
  I get the attached result. The \texttt{} is rendered differently
  by matplotlib and latex.
  
  I am using the default latex fonts, and below is my preamble.
  
  
  rc('font', **{'family':'serif', 'serif':['Computer Modern
  Roman']})
  params = {'backend': 'pdf',
    'axes.labelsize': 12,
    'text.fontsize': 12,
    'legend.fontsize': 12,
    'xtick.labelsize': 10,
    'ytick.labelsize': 10,
    'text.usetex': True,
    'figure.figsize': fig_size,
    'axes.unicode_minus': True}
  matplotlib.rcParams.update(params)
  
  
  
  What do I have to change to match the font?

Found the solution.
The default font of matplotlib is Courier, but LaTeX rendered with
Computer Modern Typewriter

Changing the first line makes matplotlib use the same font.
rc('font', **{'family':'serif', 'serif':['Computer Modern Roman'], 
                                'monospace': ['Computer Modern Typewriter']})
  


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


Re: [Matplotlib-users] NavigationToolbar2WxAgg Buttons Disappear

2012-08-15 Thread David Grudoski
I'm running:
Matplotlib 1.1.0
wxPython 2.9.2.4 osx-carbon (classic)
Python 2.6
on Mac OSX 10.6.8

On Aug 15, 2012, at 5:17 AM, Benjamin Root wrote:

> 
> 
> On Wednesday, August 15, 2012, David Grudoski wrote:
> Hi All,
> I've encountered this problem with the both NavigationToolbar2Wx and the 
> NavigationToolbar2WxAgg.
> When I click the Zoom or Pan button the button disappears. The functionality 
> is maintained so if a click the location that the button used to be displayed 
> at the toggle action still works its just that the button is no longer 
> displayed.
> Can any one help me fix this?
> Thanks
> David
> 
> Which version of matplotlib are you using?
> 
> 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] axes_grid1.inset_axes frame background color

2012-08-15 Thread Scott Henderson
Hello,

I'm trying to modify the following script to no avail:
http://matplotlib.github.com/examples/axes_grid/demo_colorbar_with_inset_locator.html

I'd like to have a white background behind the inset colorbar that 
adjusts automatically to figure resizing. I'm thinking of doing this by 
adding a Rectangle patch with the appropriate axes coordinates. What's 
the easiest way get those coordinates (sufficiently big to include the 
ticklabels) & draw the patch?

Thanks,

-- 
---
Scott T. Henderson
http://www.geo.cornell.edu/eas/gstudent/sth54/contact.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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Fwd: NavigationToolbar2WxAgg Buttons Disappear

2012-08-15 Thread David Grudoski

>> (Corrects the top posting of the earlier replies, Sorry)
> 
>> On Aug 15, 2012, at 5:17 AM, Benjamin Root wrote:
>> 
>>> 
>>> 
>>> On Wednesday, August 15, 2012, David Grudoski wrote:
>>> Hi All,
>>> I've encountered this problem with the both NavigationToolbar2Wx and the 
>>> NavigationToolbar2WxAgg.
>>> When I click the Zoom or Pan button the button disappears. The 
>>> functionality is maintained so if a click the location that the button used 
>>> to be displayed at the toggle action still works its just that the button 
>>> is no longer displayed.
>>> Can any one help me fix this?
>>> Thanks
>>> David
>>> 
>>> Which version of matplotlib are you using?
>>> 
>>> Ben Root
>> 
> 
> 
> 
>> From: David Grudoski 
>> Date: August 15, 2012 6:30:20 AM PDT
>> To: Benjamin Root 
>> Cc: "matplotlib-users@lists.sourceforge.net" 
>> 
>> Subject: Re: [Matplotlib-users] NavigationToolbar2WxAgg Buttons Disappear
>> 
>> I'm running:
>> Matplotlib 1.1.0
>> wxPython 2.9.2.4 osx-carbon (classic)
>> Python 2.6
>> on Mac OSX 10.6.8
> 
> I tried running  the  wxcursor_demo.py from the Matplotlib examples it also 
> behave the same way. 
> When the zoom or pan icon is selected it disappears from the toolbar but the 
> space it occupies behaves as if it is still there just not visible.

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