Eric Firing | 3 Sep 02:14
Favicon
Gravatar

Re: patch: Error Bars, upper and lower limits

Manuel,

Sorry for the delay in looking at your patch.

I am not familiar with this type of plot, as opposed to ordinary 
errorbars.  What is it used for?  What is the meaning of the upper and 
lower limits?

The errorbar docstring will need to be modified to explain the new 
kwargs.  Additional comments are interspersed below.

Manuel Metz wrote:
> Hello,
> I have attached a patch that adds the ability to draw upper/lower limits 
> indicators for errorbars. New keyword args had to be introduced to the 
> errorbar command, and I also had to add new plot styles. I chose 
> 'y','Y','z' and 'Z' as new linestyles for arrowheads pointing up,down, 
> left, right (see lines.py).

These markers seem to me to be very special, more similar to the 
TICKLEFT and friends than to the general-use markers for which letters 
are assigned.  Since there is nothing mnemonic about your suggested 
letter assignments, I think it would be better not to further clutter 
that list of letters, and instead to extend the list of tick-like 
things.  I suggest calling them CARETUP, CARETDOWN, etc, since they seem 
to me more like carets than anything else.  The change to names from 
single characters will make the code in the errorbar method more readable.

> 
> An example and its output is also attached.
(Continue reading)

Manuel Metz | 3 Sep 10:17
Picon
Favicon

Re: patch: Error Bars, upper and lower limits

Eric,

Eric Firing wrote:
> Manuel,
> 
> Sorry for the delay in looking at your patch.
> 
> I am not familiar with this type of plot, as opposed to ordinary 
> errorbars.  What is it used for?  What is the meaning of the upper and 
> lower limits?

Sometimes physicist or astronomers want to indicate that a certain
measurement only given an upper- or lower-limit for a _measured value_,
which means that the true value can not directly be measured.
   One example is the mass of the (electron)-neutrino which is not 
known, but some experiments indicate that it has to be smaller than some 
M +- dM. In such a case one would use an arrow pointing downwards to 
indicate that this measurement only gives an upper limit for the mass.
   Another example is the inferred mass of satellite galaxies of the 
Milky Way. Here some measurements give the minimum mass of the galaxies, 
while its total mass might be larger; in this case one wants to indicate 
a lower limit, i.e. use an error-bar with an arrow pointing upwards.

So, the basic meaning is: you can derive a value and its formal
uncertainties, but you *know* that this value is only an
upper-/lower-limit of the true value; this is indicated by the arrow.

> The errorbar docstring will need to be modified to explain the new 
> kwargs.  Additional comments are interspersed below.
 >
(Continue reading)

Manuel Metz | 4 Sep 12:32
Picon
Favicon

Re: custom symbol patch (2)

Hello,

I just re-created the patch against svn revision 3773 and also updated 
it on sourceforge. I also added a modified version of 
scatter_star_poly.py from the examples and its output.

It would really be nice to have this patch applied

Manuel

Index: collections.py
===================================================================
--- collections.py	(revision 3773)
+++ collections.py	(working copy)
@@ -568,9 +568,42 @@
         ns2 = self.numsides*2
         r = scale*npy.ones(ns2)
         r[1::2] *= 0.5
-        theta  = (2.*math.pi/(ns2))*npy.arange(ns2) + self.rotation
+        theta  = (math.pi/self.numsides)*npy.arange(ns2) + self.rotation
         self._verts = zip( r*npy.sin(theta), r*npy.cos(theta) )

+class AsteriskPolygonCollection(RegularPolyCollection):
+    def __init__(self,
+                 dpi,
+                 numsides,
+                 rotation = 0 ,
+                 sizes = (1,),
(Continue reading)

Michael Droettboom | 4 Sep 15:55

Re: mathtext in wx widgets

Just FYI -- this is what it looks like in Linux/wxGTK.

Paul Kienzle wrote:
> On Fri, Aug 31, 2007 at 03:28:49PM -0400, Michael Droettboom wrote:
>> There is now preliminary support for getting a mathtext bitmap to 
>> transfer to a GUI widget in SVN, along with a toy wxPython example in 
>> examples/mathtext_wx.py.  I've only tested this on 
>> Linux/wxGTK2/wxPython-2.8.  I'd appreciate help with testing (and 
>> screenshots) on any other platforms you may care about.
> 
> That's wonderful!  I'm attaching a screen shot for wx 2.8 on OS/X.
> 
> The rendering is kind of ugly, but I haven't looked into it.
> 
> 	- Paul
> 
> 
> ------------------------------------------------------------------------
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
(Continue reading)

John Hunter | 4 Sep 16:52
Picon
Gravatar

Re: custom symbol patch (2)

On 9/4/07, Manuel Metz <mmetz@...> wrote:
> Hello,
>
> I just re-created the patch against svn revision 3773 and also updated
> it on sourceforge. I also added a modified version of
> scatter_star_poly.py from the examples and its output.
>
> It would really be nice to have this patch applied

Thanks for the remionder Manuel -- I added the patch and example to svn

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
John Hunter | 4 Sep 16:58
Picon
Gravatar

Re: mathtext in wx widgets

On 8/31/07, Paul Kienzle <pkienzle@...> wrote:

> That's wonderful!  I'm attaching a screen shot for wx 2.8 on OS/X.
>
> The rendering is kind of ugly, but I haven't looked into it.

My giess is that for some reason wx is not respecting the alpha
channel -- that will give you the rough, chunky text you are seeing.
I saw similar looking text when working with dvipng output before I
got the alpha channel right.

JDH

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Gael Varoquaux | 4 Sep 18:54
Favicon
Gravatar

Re: two minor logspace problem

On Fri, Aug 31, 2007 at 01:22:54PM +0400, Farid Khalili wrote:
> I have just found matplotlib, and it seems to me that it is very good
> and promising product, albeit not yet as polished as octave/gnuplot
> pair.

As a long-time user of gnuplot, I find that in certain areas matplotlib
is more polished.

Gaël

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
Jouni K. Seppänen | 4 Sep 20:35
Picon
Picon
Picon
Favicon
Gravatar

AFM reading

Michael Droettboom <mdroe@...> writes:

> With AFM reading in ft2font.cpp now, does that remove the need for
> afm.py?

What I added was a way to call FT_Attach_File, which is used to parse an
AFM file and add the metrics to an already existing Type 1 font object.
I don't know if there is any way to use Freetype's AFM parser without a
PFB file to attach the AFM file to.

> I know that the metrics are not exactly the same in a TTF vs and
> AFM, but is the interface through Freetype the same whether it's a TTF
> or AFM file?

Freetype tries to offer a unified interface to different font formats,
but for some stuff I think you have to query the sfnt tables (and what
have you) of a TTF font, which don't exist in Type 1.

TTF was historically developed because Type 1 was a proprietary Adobe
technology. Adobe published the spec right after that, but the font
formats are quite different as a result.

--

-- 
Jouni K. Seppänen
http://www.iki.fi/jks

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
(Continue reading)

Michael Droettboom | 4 Sep 21:01

Re: mathtext rotation

SVN r3776 now has support for rotation of mathtext to any angle in the 
Agg backend (i.e. it's now supported in all backends).

Enjoy!

Mike

Michael Droettboom wrote:
> Paul Kienzle wrote:
>> On Thu, Aug 30, 2007 at 02:19:47PM -0400, Michael Droettboom wrote:
>>> Paul Kienzle wrote:
>>>> Hi all,
>>>> Before I look to deeply into this myself, is there anyone working on it 
>>>> already?  Is there anything I need to look out for when implementing it?
>>> I've made a few excursions down that road --
>>>
>>> For bitmap font rendering, the entire math expression is first laid out 
>>> in a greyscale bitmap buffer, which is cached and then transferred to 
>>> the main plot bitmap.  It was already that way when I got here, and I 
>>> assume that's an important optimization (so the text doesn't have to be 
>>> re-laid-out when the plot is zoomed/panned).  I say "perhaps" because I 
>>> have no data to back it up, and don't know if that came out of profiling 
>>> or not.
>>>
>>> There are a few key low level pieces that are missing for rotation:
>>>
>>> - FT2Font.draw_glyph_to_bitmap does not support rotation.  This would 
>>> have to be added, or there may be a way to use 
>>> set_text/draw_glyphs_to_bitmap which does support rotation.  However, 
>>> that would make rendering the entire expression to a single buffer much 
(Continue reading)

John Hunter | 4 Sep 21:04
Picon
Gravatar

Re: mathtext rotation

On 8/30/07, Michael Droettboom <mdroe@...> wrote:

> > ...but if we need to go into agg anyway, why not use Agg's font handling
> > capabilities directly?
>
> Perhaps historical reasons.  I wonder if they're still relevant.

Yes, that's it.  agg did not have font support when the agg backend
was added.  It was always easier to continue adding and extending what
we had (ft2font) than to port over to agg's support.

JDH

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

Gmane