Re: [Matplotlib-users] font rendering quality

2009-12-01 Thread Ernest Adrogué
 1/12/09 @ 09:16 (-0500), thus spake Michael Droettboom:
> Subpixel rendering is almost never what you want when producing a
> PNG file, since it is likely to be shared on a different machine
> requiring different subpixel settings.  But it looks like your
> mozilla example is not using subpixel rendering either, though it
> appears to have very strong hinting.

Yes, it's not a subpixel rendering problem. I can tell that
subpixel rendering is not enabled because I'm not seeing "rainbows",
which I always see when it's enabled. It's definitely a hinting issue.

> matplotlib's Agg backends borrows a technique used by Adobe Acrobat
> which is to use strong hinting in the vertical direction, but more
> subtle hinting in the horizontal.  When we did a comprehensive
> comparison of various hinting options about two years ago it was the
> strong winner.  See this:
> 
> http://www.mail-archive.com/matplotlib-de...@lists.sourceforge.net/msg01480.html
> 
> (Unfortunately, the linked images are no longer available).
> 
> If these settings are not to your liking, I would recommend the
> Cairo backend (which should pull in the same settings as the rest of
> your Gnome desktop, I believe), or one of the vector backends and
> then tweaking the rendering.

Confirmed. The GTK backend -haven't tried Cairo yet- honours the
system settings for font rendering. It looks much better now, in my
opinion.

> Alternatively, we could provide this "stretched hinting" as a
> configuration option.  If you think that's superior to these other
> options, please file a feature request so it doesn't get lost (and
> it should be a fairly straightforward patch for someone new to the
> code base.)

Ok. I will open a feature request, if you think it's okay.
I think I'll be sticking with the GTK backend for now, anyway.

Thanks.
Ernest

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Computing Simple Statistics from a Histogram

2009-12-01 Thread Wayne Watson
I do not believe that any of those calculations are based on the pdf, 
frequency of occurrence-histogram. This, (1, 2,2, 4, 2,5,4) and not this 
(1,3, 0,2,1). The latter are the frequencies of occurrence for 1,2,3,4,5.

John Hunter wrote:
> On Tue, Dec 1, 2009 at 6:32 AM, Wayne Watson
>  wrote:
>   
>> Is there some statistics function that computes the mean, std. dev., 
>> min/max, etc. from a frequency distribution?
>> 
>
> numpy has many functions for basic descriptive statistics.  If "data"
> is an array of your data, you can do (import numpy as np)
>
> mean: np.mean(data)
> median: np.median(data)
> standard deviation: np.std(data)
> min: np.min(data)
> max: np.max(data)
>
> In scipy.stats, there are many more (skew, kurtosis, etc...)  See
> also, this example:
>
>
> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/py4science/examples/stats_descriptives.py?view=markup&pathrev=4027
>
> JDH
>
>   

-- 
   Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet  

  The popular press and many authorities believe the number
  of pedofiles that prowl the web is 50,00. There are no
  figures that support this. The number of children below
  18 years of age kidnapped by strangers is 1 in 600,000,
  or 115 per year. -- The Science of Fear by D. Gardner
 
Web Page: 


--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] metadata of png-files

2009-12-01 Thread Michael Droettboom
The PNG writer in matplotlib doesn't support writing of extended 
metadata.  However, it may be less useful anyway, as while you can put 
arbitrary key/value pairs in a PNG file, I don't believe there's any 
standards for what the keys should be, so there aren't many tools that 
use it.  (If I'm just not able to find it, point it out to me...)  By 
contrast, many of the metadata fields in PDF are standardized so content 
management systems etc. do take advantage of them.

Mike

Marius Jan Klein wrote:
> Thanks for your help concerning the pdf files! It was exactly what I was 
> looking for. Is there anything similar for png-files?
>
>
>
>   
>> Marius Jan Klein  writes:
>>
>> 
>>> I want to edit the metadata of pdf- or png-files when creating one of
>>> these files. I do not want to use for example Pypdf because then
>>> Python must read the file first before it can be edited.
>>>   
>
>
>
>   
>> Jouni K. Seppänen  writes:
>>
>> Now there is (in the trunk, revision 7964), via the PdfPages mechanism:
>>
>> >from matplotlib.backends.backend_pdf import PdfPages
>> >from pylab import *
>> 
>>> pdf = PdfPages('testing.pdf')
>>> plot([3,1,4])
>>> pdf.savefig()
>>> d = pdf.infodict()
>>> d['Title'] = 'Testing'
>>> d['Author'] = u'Jouni K. Sepp\xe4nen'
>>> pdf.close()
>>>   
>
> --
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing. 
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Color in 3d plots

2009-12-01 Thread Michael (Mike) Alger
Sorry i was getting a bit frustrated by checking every day and seeing other 
problems getting solved relativly fast, again i understand its a big project, 
and i do appreciate your time, i hope i didn`t come off as a complete jerk. 

I figured since my suggested change would affect how others would  interact 
with the existing function i should defer some interface design decisions to 
someone more familiar with the API and the interface philosophy before i would 
start suggesting my hacks to the code to get it to do what i want.   again, i 
would love to build this functionality into the existing  code,  and it think 
it could be done via a good choice of  kwargs parameters. Again i know how i 
can do this for my particular solution but how this should be done to minimize 
the effect on other users of the code i am not sure. 


thanks again  for the response, i was going a bit crazy as i saw MPL as the 
perfect solution as it does just about everything i need except that one tiny 
variation in the surface command and i didn't want to rule it out its use in a 
user interface project i have work on in the coming months because of it.

Mike 


- Original Message -
From: John Hunter 
Date: Monday, November 30, 2009 11:26 pm
Subject: Re: [Matplotlib-users] Color in 3d plots
To: Mike Alger 
Cc: matplotlib-users@lists.sourceforge.net, Reinier Heeres 


> On Mon, Nov 30, 2009 at 8:06 PM, Mike Alger  wrote:
> > After a weekend of no replies I managed to figure a way out myself
> 
> Hey Mike,  sorry for the radio silence.  mpl is a big project and no
> one developer is equipped to answer questions about everything.  We
> currently have only one active developer (Reinier) working on the 3D
> stuff.  I've CCd him, and hopefully he can take a look at your patch.
> 
> >
> > 3.)If I do make a modification should it be as a separate 
> function with
> > the additional variable or should I try to stuff the new capability 
> into the
> > old function
> >
> > 4.)is there a clean easy to follow tutorial for submitting 
> changes via
> > svn or can I rely on someone else to do the final commit?
> 
> In general, if the new functionality is close to the old, we'd like to
> see it incorporated into the existing API, perhaps with a new keyword
> argument.  We have some documentation on how to contribute to mpl at
> http://matplotlib.sourceforge.net/devel/coding_guide.html; see also
> the FAQ 
> http://matplotlib.sourceforge.net/faq/howto_faq.html#contributing-howto
> 
> > As this was “left to the reader as an exercise” I will leave the integration
> > or improvement of this solution as an exercise to the next reader
> >
> > What I have done is basically cloned the plot surface function and replaced
> > the avgz variable with a reference to the “colors” parameter i have 
> added to
> > the function call.
> >
> > This code doesn’t  center things perfectly with respect to the grid 
> (for
> > some reason a 40x40 grid turns into 39x39 grid in the function) 
> again this
> > is something else that could be improved, however I am happy with it 
> and a
> > one pixel shift won’t be missed in my plots.  I also have no real 
> clue as to
> > what the following comments was about
> >
> >
> >
> >     # The construction leaves the array with duplicate points,
> > which
> >
> >     # are removed here.
> >
> >
> >
> >  but it is probably related to my non centered plots.
> >
> > What follows is the modified function  :
> >
> > def plot_surface2(self, X, Y, Z, colors, *args, **kwargs):
> 
> 
> What will be most helpful is an "svn diff", as explained in the coding
> guide and FAQ linked above, with an example (included in the diff)
> that shows the before and after behavior.  That way even an naive
> developer can appreciate the before and after changes and commit the
> code if the original developer responsible for that part of the code
> base is not available.  The ideal situation is "apply this patch
> generated from an svn diff and run example so_and_so.py to see the
> plot with and without the patch".  As explained in the FAQ, if you
> don't get proper attention here on the mailing list, please post a bug
> or patch on the sourceforge tracker so we don't lose it -- sometimes
> our inattention is not due to lack of interest but to lack of time,
> and a report filed on the tracker helps us not lose the thread.
> 
> Thanks for the help!
> 
> JDH

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] metadata of png-files

2009-12-01 Thread Marius Jan Klein
Thanks for your help concerning the pdf files! It was exactly what I was 
looking for. Is there anything similar for png-files?



> Marius Jan Klein  writes:
>
>> I want to edit the metadata of pdf- or png-files when creating one of
>> these files. I do not want to use for example Pypdf because then
>> Python must read the file first before it can be edited.



>Jouni K. Seppänen  writes:
>
>Now there is (in the trunk, revision 7964), via the PdfPages mechanism:
>
>>from matplotlib.backends.backend_pdf import PdfPages
>>from pylab import *
>>pdf = PdfPages('testing.pdf')
>>plot([3,1,4])
>>pdf.savefig()
>>d = pdf.infodict()
>>d['Title'] = 'Testing'
>>d['Author'] = u'Jouni K. Sepp\xe4nen'
>>pdf.close()
>

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bliting speed improvment patch (QT4Agg backend) + example of sliding demo

2009-12-01 Thread Darren Dale
On Mon, Nov 30, 2009 at 7:01 PM, Laurent Dufrechou
 wrote:
> Hi there,
>
> Finally with lot of try I've finally managed to make blitting of a cmap
> working.
> I've also patched QT4agg backend, to make a redraw immediately.
> (replaced self.draw by self.repaint)
> In my current project I was able to stream a 655KB network stream, do
> demodulation of an IQ stream and display the spectrogram in real time (4096
> pixel per 1024) with matplotlib and QT4 backend, thx to the patch + blitting
> example attached.
>
> Without patch, the refrech was veeery long. (waiting for QT loop to execute
> code wen it wanted.)
> And do NOT always work. If you've got a powerfull pc you've got chance to
> see only white background...
> (or simply the loop timer to 0, you will see that without patch blit does
> not work).
>
> Only tested under windows currently, 'cause my project is on windows
> currently...
>
> There is one bug in the example, that I didn't manage to correct yet.
> Depending on screen resolution, the color of the cmap blitted area can be
> kind of alpha'ed. (that is look like a little bit transparent...) , Any idea
> on the root of this issue?
>
> By the way to make the example work I needed to do this:
>        self.ax2.draw_artist(self.line2)
>        self.blit(self.ax2.bbox)
>        self.restore_region(self.background2)
>
> that is blit before restore... don't understand why yet.
>
> Any comment welcomed.
>
> Is there any chance, after review, to find a way to include this in main
> trunk?
> What do think about this?

I'm not able to comment on the other questions you raised, but the
change to backend_qt4agg.py improved the behavior of the existing qt4
blit example (without your changes the axes labels were not drawn on
my machine), so I checked the change into the trunk. Thank you!

Darren

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Extending patches.Rectangle class

2009-12-01 Thread Jorge Scandaliaris
Hi,
How difficult would be to extend the Rectangle class so besides its permimeter
it draws lines showing halfs or thirds of the width and height? I use rectangle
to mark the locations of moving objects in sequences of images, and such lines
would make the job easier.

Thanks,

Jorge


--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Draggable and resizeable rectangle example

2009-12-01 Thread Jorge Scandaliaris
Hi,
I just had to label a sequence of images with the position and scale of a moving
object. To do this I took the nice example from
http://matplotlib.sourceforge.net/users/event_handling.html (the one using
blitting) and extended to be resizeable. The extension is trivial, but it might
be useful to someone. The code is inlined at the end of this message.

Jorge

# draggable rectangle with the animation blit techniques; see
# http://www.scipy.org/Cookbook/Matplotlib/Animations
import numpy as np
import matplotlib.pyplot as plt

class DraggableResizeableRectangle:
"""
Draggable and resizeable rectangle with the animation blit techniques.
Based on example code at
http://matplotlib.sourceforge.net/users/event_handling.html
If *allow_resize* is *True* the recatngle can be resized by dragging its
lines. *border_tol* specifies how close the pointer has to be to a line for
the drag to be considered a resize operation. Dragging is still possible by
clicking the interior of the rectangle. *fixed_aspect_ratio* determines if
the recatngle keeps its aspect ratio during resize operations.
"""
lock = None  # only one can be animated at a time
def __init__(self, rect, border_tol=.15, allow_resize=True,
 fixed_aspect_ratio=True):
self.rect = rect
self.border_tol = border_tol
self.allow_resize = allow_resize
self.fixed_aspect_ratio = fixed_aspect_ratio
self.press = None
self.background = None

def connect(self):
'connect to all the events we need'
self.cidpress = self.rect.figure.canvas.mpl_connect(
'button_press_event', self.on_press)
self.cidrelease = self.rect.figure.canvas.mpl_connect(
'button_release_event', self.on_release)
self.cidmotion = self.rect.figure.canvas.mpl_connect(
'motion_notify_event', self.on_motion)

def on_press(self, event):
'on button press we will see if the mouse is over us and store some 
data'
if event.inaxes != self.rect.axes: return
if DraggableRectangle.lock is not None: return
contains, attrd = self.rect.contains(event)
if not contains: return
#print 'event contains', self.rect.xy
x0, y0 = self.rect.xy
w0, h0 = self.rect.get_width(), self.rect.get_height()
aspect_ratio = np.true_divide(w0, h0)
self.press = x0, y0, w0, h0, aspect_ratio, event.xdata, event.ydata
DraggableRectangle.lock = self

# draw everything but the selected rectangle and store the pixel buffer
canvas = self.rect.figure.canvas
axes = self.rect.axes
self.rect.set_animated(True)
canvas.draw()
self.background = canvas.copy_from_bbox(self.rect.axes.bbox)

# now redraw just the rectangle
axes.draw_artist(self.rect)

# and blit just the redrawn area
canvas.blit(axes.bbox)

def on_motion(self, event):
'on motion we will move the rect if the mouse is over us'
if DraggableRectangle.lock is not self:
return
if event.inaxes != self.rect.axes: return
x0, y0, w0, h0, aspect_ratio, xpress, ypress = self.press
self.dx = event.xdata - xpress
self.dy = event.ydata - ypress
#self.rect.set_x(x0+dx)
#self.rect.set_y(y0+dy)

self.update_rect()

canvas = self.rect.figure.canvas
axes = self.rect.axes
# restore the background region
canvas.restore_region(self.background)

# redraw just the current rectangle
axes.draw_artist(self.rect)

# blit just the redrawn area
canvas.blit(axes.bbox)

def on_release(self, event):
'on release we reset the press data'
if DraggableRectangle.lock is not self:
return

self.press = None
DraggableRectangle.lock = None

# turn off the rect animation property and reset the background
self.rect.set_animated(False)
self.background = None

# redraw the full figure
self.rect.figure.canvas.draw()

def disconnect(self):
'disconnect all the stored connection ids'
self.rect.figure.canvas.mpl_disconnect(self.cidpress)
self.rect.figure.canvas.mpl_disconnect(self.cidrelease)
self.rect.figure.canvas.mpl_disconnect(self.cidmotion)

def update_rect(self):
x0, y0, w0, h0, aspect_ratio, xpress, ypress = self.press
dx, dy = self.dx, self.dy
bt = self.border_tol
fixed_ar = self.fixed_aspect_ratio
if (not self.allow_resize or
(abs(x0+np.true_divide(w0,2)-xpress)http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] font rendering quality

2009-12-01 Thread Michael Droettboom
Subpixel rendering is almost never what you want when producing a PNG 
file, since it is likely to be shared on a different machine requiring 
different subpixel settings.  But it looks like your mozilla example is 
not using subpixel rendering either, though it appears to have very 
strong hinting.

matplotlib's Agg backends borrows a technique used by Adobe Acrobat 
which is to use strong hinting in the vertical direction, but more 
subtle hinting in the horizontal.  When we did a comprehensive 
comparison of various hinting options about two years ago it was the 
strong winner.  See this:

   
http://www.mail-archive.com/matplotlib-de...@lists.sourceforge.net/msg01480.html

(Unfortunately, the linked images are no longer available).

If these settings are not to your liking, I would recommend the Cairo 
backend (which should pull in the same settings as the rest of your 
Gnome desktop, I believe), or one of the vector backends and then 
tweaking the rendering.

Alternatively, we could provide this "stretched hinting" as a 
configuration option.  If you think that's superior to these other 
options, please file a feature request so it doesn't get lost (and it 
should be a fairly straightforward patch for someone new to the code base.)

Mike

Darren Dale wrote:
> On Tue, Dec 1, 2009 at 6:37 AM, Ernest Adrogué  wrote:
>   
>> 30/11/09 @ 22:28 (-0600), thus spake John Hunter:
>> 
>>> The two examples in the page you link to have different font sizes and
>>> possibly different font weights, which makes it difficult to do
>>> side-by-side comparisons.  Could you post an example with
>>> similar/identical settings?
>>>   
>> Yes, I have attached another example with different font sizes
>> (8,9,10). The exact weight is impossible to replicate, I tried with
>> "light" and "normal".
>>
>> I think that the problem might be the lack of hinting. In my
>> fonts.conf file I have both "hinting" and "autohinting" enabled. if
>> I disable these options then the fonts in other applications resemble
>> a lot the ones I am getting now with mpl.
>> 
>
> I am pretty sure the issue here is subpixel rendering. Try comparing
> the output of the gtkagg backend, which does not do subpixel
> rendering, with that of gtkcairo, which does.
>
> Darren
>
> --
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing. 
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Computing Simple Statistics from a Histogram

2009-12-01 Thread John Hunter
On Tue, Dec 1, 2009 at 6:32 AM, Wayne Watson
 wrote:
> Is there some statistics function that computes the mean, std. dev., min/max, 
> etc. from a frequency distribution?

numpy has many functions for basic descriptive statistics.  If "data"
is an array of your data, you can do (import numpy as np)

mean: np.mean(data)
median: np.median(data)
standard deviation: np.std(data)
min: np.min(data)
max: np.max(data)

In scipy.stats, there are many more (skew, kurtosis, etc...)  See
also, this example:


http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/py4science/examples/stats_descriptives.py?view=markup&pathrev=4027

JDH

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] font rendering quality

2009-12-01 Thread Darren Dale
On Tue, Dec 1, 2009 at 6:37 AM, Ernest Adrogué  wrote:
> 30/11/09 @ 22:28 (-0600), thus spake John Hunter:
>> The two examples in the page you link to have different font sizes and
>> possibly different font weights, which makes it difficult to do
>> side-by-side comparisons.  Could you post an example with
>> similar/identical settings?
>
> Yes, I have attached another example with different font sizes
> (8,9,10). The exact weight is impossible to replicate, I tried with
> "light" and "normal".
>
> I think that the problem might be the lack of hinting. In my
> fonts.conf file I have both "hinting" and "autohinting" enabled. if
> I disable these options then the fonts in other applications resemble
> a lot the ones I am getting now with mpl.

I am pretty sure the issue here is subpixel rendering. Try comparing
the output of the gtkagg backend, which does not do subpixel
rendering, with that of gtkcairo, which does.

Darren

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Computing Simple Statistics from a Histogram

2009-12-01 Thread Wayne Watson
Is there some statistics function that computes the mean, std. dev., min/max, 
etc. from a frequency distribution?

-- 
   Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
  Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet  

  The popular press and many authorities believe the number
  of pedifiles that prowl the web is 50,00. There are no
  figures that support this. The number of children below
  18 years of age kidnapped by strangers is 1 in 600,00,
  or 115 per year. -- The Science of Fear by D. Gardner
 
Web Page: 


--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] font rendering quality

2009-12-01 Thread Ernest Adrogué
30/11/09 @ 22:28 (-0600), thus spake John Hunter:
> The two examples in the page you link to have different font sizes and
> possibly different font weights, which makes it difficult to do
> side-by-side comparisons.  Could you post an example with
> similar/identical settings?

Yes, I have attached another example with different font sizes
(8,9,10). The exact weight is impossible to replicate, I tried with
"light" and "normal".

I think that the problem might be the lack of hinting. In my
fonts.conf file I have both "hinting" and "autohinting" enabled. if
I disable these options then the fonts in other applications resemble
a lot the ones I am getting now with mpl.

Bye.
<>--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Output to any vector format openoffice can use

2009-12-01 Thread marcusantonius

I am searching a way, so that I can insert my matplotlib graphs as vector
data in openoffice. I make colormaps using pcolorfast. If I save the figure
as emf, the colormap inside the axes vanishes, because the normal emf
backend cannot include rasterized data. Is there any way (e.g. using a
different backend) which gives emf/wmf files which contain the rasterized
data?

Is there a convertor from svg to emf which can do the trick? (I tried
uniconvertor but it also looses the rasterized data). I tried to insert
svg/eps/pdf files into openoffice, but the results are less than promising
-- 
View this message in context: 
http://old.nabble.com/Output-to-any-vector-format-openoffice-can-use-tp26589911p26589911.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users