#2 Graph Baseline Fixes


For PyX version 0.4.1

Add pdftex.map to the font list
Increases tex timeout to 120

Makes it so that axispainter can have a axis line
painted at a value other than 0 (such as 1)
Adds named parameter axiszeroline to
graph.axispainter constructor.

    Allows bars to be graph from from a centerline other

than 0 (such as 1)
Adds named parameter baseline to graph.bar


  • Andre Wobst

    Andre Wobst - 2003-12-19

    Logged In: YES

    There are several topics addressed in your patch. Let be briefly
    comment them:

    The font map problem was addressed in CVS already. There is an
    option to add further map files within our PyX script. Additionally,
    you can specify map files in a ~/.pyxrc file (and a /etc/pyxrc
    IIRC). We're quite happy about that now and using psfonts.map as
    the default like dvips. Why should we change that (you may use
    the udpmap script to properly setup your psfonts.map)?

    About the timeout: We had some discussion about that some time
    ago. The problem with a long timeout is, that the user might think,
    that the hole system hangs, while its just waiting for TeX. Its easy
    relatively easy to get into such a state (if you want to). Try:
    from pyx import *
    (Of course, nobody wants to do that, but there might be cases,
    where it is much more tricky.) However, there was a good solution
    suggested in a previous discussion, which is implemented in CVS
    now. See http://sourceforge.net/mailarchive/message.php?

    About the zeroline I'm not sure, if this is really needed. You can
    always get a grid line from the graph and stroke that. So I'm not
    sure if we really want that. You can also use spcial ticks for that
    and plot gridlines (i.e. you can draw several lines by that). For
    bars the storry is quite different. It is really a good suggestion to
    add this feature. I like it. However, could you tell me, why we
    shouldn't do it the following way: Couldn't we get rid of the
    fromzero-flag and use the baseline parameter having a value or
    None? Then the name "baseline" might be worth a discussion as
    well ... but in principle I would like to add that feature this way ...
    what do you think? Would this be fine to you or do you have a
    good reason to add the "baseline" feature to both, the axes and
    the bar style?

  • Matthew Bridges

    Matthew Bridges - 2003-12-22

    Logged In: YES

    First, thanks for the quick comments.

    In response to your comments, we didn't check the mailing
    archives before submitting the patch, so we didn't realize a better
    fix was already in CVS for the pdftex and timeout issues.

    As for the baseline change, we kept fromzero around for
    backwards compatability, as we weren't sure how willing to break
    it you were. Your way is how we wanted to do it.

    Lastly, since there is already a parameter zerolineattrs specifically
    for the zero line, you've already made the 0 line special. Why not
    make it a little more general and allow the line to be anywhere.

  • Andre Wobst

    Andre Wobst - 2004-02-24

    Logged In: YES

    The zeropath feature of the axispainter is removed in CVS head. This
    whole feature is not worth the additional parameters it introduces. It is
    easy to stroke a path along a grid line yourself (there is an example in
    CVS, which shows it). Hence you can also stroke several gridlines like
    that ...

    The feature you introduced for bars was indeed very nice. While I
    recently rewrote most of the graph styles I made the fromvalue a
    variable. Now you you can specify the position you want the bars to start
    from like suggested by you.

    While we now addressed all requested features by this patch (although
    differently from the proposed way), I'm closing this patch now. Thanks
    for the contribution.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks