Grid line over shadows actual plotted line

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Grid line over shadows actual plotted line

Vinj Vinj
I have charts which are using the add_collection function to draw
financial bar charts. I also have the grid line enabled. When the chart
is drawn (example can be seen at):

http://s3.amazonaws.com/oysb/wmt_n.png

any line drawn through add_collection which overlaps with the grid line
does not get displayed. Is there a way to send the grid line to the
background?

VJ  



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Grid line over shadows actual plotted line

Eric Firing
VJ,

Have you tried

ax.set_axisbelow(True)

where ax is your axes instance?

Eric

Vineet Jain wrote:

> I have charts which are using the add_collection function to draw
> financial bar charts. I also have the grid line enabled. When the chart
> is drawn (example can be seen at):
>
> http://s3.amazonaws.com/oysb/wmt_n.png
>
> any line drawn through add_collection which overlaps with the grid line
> does not get displayed. Is there a way to send the grid line to the
> background?
>
> VJ  


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Grid line over shadows actual plotted line

Vinj Vinj

> ax.set_axisbelow(True)
Thanks a lot. That fixed the problem.

VJ





-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Grid line over shadows actual plotted line

Rob Hetland

On May 7, 2006, at 11:15 PM, Vineet Jain wrote:
>
>> ax.set_axisbelow(True)

Is there a way to set this in the rc file?  axisbelow(True) would be  
my default preference.

-Rob.

-----
Rob Hetland, Assistant Professor
Dept of Oceanography, Texas A&M University
p: 979-458-0096, f: 979-845-6331
e: [hidden email], w: http://pong.tamu.edu



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Grid line over shadows actual plotted line

Eric Firing
Robert Hetland wrote:

>
> On May 7, 2006, at 11:15 PM, Vineet Jain wrote:
>
>>
>>> ax.set_axisbelow(True)
>
>
> Is there a way to set this in the rc file?  axisbelow(True) would be  my
> default preference.
>
> -Rob.

The rc file is already pretty big--we might instead consider making
axisbelow(True) the hardwired default.  It seems logical to me.  It
would be good to hear from others--are there people who like the present
default and/or prefer adding this option to the rc collection?

Looking at the code a little more, I wonder whether the best way to
handle this might not be by taking advantage of zorder more
consistently.  I think we could spread out the default zorders, assign a
suitable zorder to the axis artists, add those artists to the artists
list in the axes.draw method, and then let the zorder take care of the
rest automatically.  This way we could ensure a logical default order:
image, all patch-like things, axis grids, all line-like things; and if
anyone wanted to change the order, it could be done easily via setting
selected zorder values.  If necessary, convenience functions could be
used for setting zorder without the user having to know which numerical
values were assigned for which types of object.

I think this could make the code and interface simpler, more
self-consistent, and more flexible.  (My remarks are based on only a
quick look, so I may be missing something important.)

Eric


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Grid line over shadows actual plotted line

John Hunter-8
>>>>> "Eric" == Eric Firing <[hidden email]> writes:

    Eric> The rc file is already pretty big--we might instead consider
    Eric> making axisbelow(True) the hardwired default.  It seems

I already committed this change, but your comments on bloating rc
files are well taken.

    Eric> logical to me.  It would be good to hear from others--are
    Eric> there people who like the present default and/or prefer
    Eric> adding this option to the rc collection?

    Eric> Looking at the code a little more, I wonder whether the best
    Eric> way to handle this might not be by taking advantage of
    Eric> zorder more consistently.  I think we could spread out the
    Eric> default zorders, assign a suitable zorder to the axis

They don't need to be spread out per say, since these are floats we
can subdivide them ad nauseaum.  Helper functions would make this more
intuitive, like

  myobj.set_zorder(zhelper.between(gridline, myline))

    Eric> I think this could make the code and interface simpler, more
    Eric> self-consistent, and more flexible.  (My remarks are based
    Eric> on only a quick look, so I may be missing something
    Eric> important.)

But people will still want to set defaults...

JDH


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Grid line over shadows actual plotted line

Eric Firing
John Hunter wrote:

>>>>>>"Eric" == Eric Firing <[hidden email]> writes:
>
>
>     Eric> The rc file is already pretty big--we might instead consider
>     Eric> making axisbelow(True) the hardwired default.  It seems
>
> I already committed this change, but your comments on bloating rc
> files are well taken.
>
>     Eric> logical to me.  It would be good to hear from others--are
>     Eric> there people who like the present default and/or prefer
>     Eric> adding this option to the rc collection?
>
>     Eric> Looking at the code a little more, I wonder whether the best
>     Eric> way to handle this might not be by taking advantage of
>     Eric> zorder more consistently.  I think we could spread out the
>     Eric> default zorders, assign a suitable zorder to the axis
>
> They don't need to be spread out per say, since these are floats we
> can subdivide them ad nauseaum.  Helper functions would make this more
> intuitive, like
>
>   myobj.set_zorder(zhelper.between(gridline, myline))

Agreed.

Unless someone else would like to do it, I think I can work on this
fairly soon, before or after I finish the work I am doing now on a new
colorbar.

>
>     Eric> I think this could make the code and interface simpler, more
>     Eric> self-consistent, and more flexible.  (My remarks are based
>     Eric> on only a quick look, so I may be missing something
>     Eric> important.)
>
> But people will still want to set defaults...

Granted, and this flexibility is good.

Eric


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users