clipping tick lines

Hey,

I noticed today, while working on my skewT, that you can't tell the axis objects to clip their ticklines. If you want to set clipping on each individual tickline. I saw that the code is there in the relevant classes, but the lines to set clipping are disabled in set_clip_path() or _set_artist_props(). My SVN foo is failing me right now, so I can't find anything to tell me why these changes were made.

Anyone have any ideas?

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Ryan May wrote:

Hey,

I noticed today, while working on my skewT, that you can't tell the axis objects to clip their ticklines. If you want to set clipping on each individual tickline. I saw that the code is there in the relevant classes, but the lines to set clipping are disabled in set_clip_path() or _set_artist_props(). My SVN foo is failing me right now, so I can't find anything to tell me why these changes were made.

Does this link work for you? (Sometimes sourceforge is painfully slow, sometimes bits of it seem to simply go away.)

I find the browser view quite helpful for finding out which changes were made when, and by whom. To find out why, one must often ask or go to the mailing list archive.

Anyone have any ideas?

I don't, but it appears that the set_clip_path method was introduced in 4817 by Mike D., complete with the commented-out lines.

···

Ryan

Eric Firing wrote:

Ryan May wrote:

Hey,

I noticed today, while working on my skewT, that you can't tell the axis objects to clip their ticklines. If you want to set clipping on each individual tickline. I saw that the code is there in the relevant classes, but the lines to set clipping are disabled in set_clip_path() or _set_artist_props(). My SVN foo is failing me right now, so I can't find anything to tell me why these changes were made.

Does this link work for you? (Sometimes sourceforge is painfully slow, sometimes bits of it seem to simply go away.)

matplotlib download | SourceForge.net

I find the browser view quite helpful for finding out which changes were made when, and by whom. To find out why, one must often ask or go to the mailing list archive.

Typical. I find it quite useful too, which is why I tried going there earlier today. SF had turned off Viewvc due to the server load it was causing. Now of course when you go to it, it's on.... :slight_smile:

Anyone have any ideas?

I don't, but it appears that the set_clip_path method was introduced in 4817 by Mike D., complete with the commented-out lines.
matplotlib download | SourceForge.net

matplotlib download | SourceForge.net

Alright. Mike?

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Eric Firing wrote:

Anyone have any ideas?

I don't, but it appears that the set_clip_path method was introduced in 4817 by Mike D., complete with the commented-out lines.
matplotlib download | SourceForge.net

matplotlib download | SourceForge.net

Uncommenting them doesn't seem to break anything and it solves my problem as well. I guess there could be performance impacts so I'll wait for Mike to weigh in.

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

(Just back from vacation)

That change was long enough ago that I don't remember the reason -- it may have just been a debugging hack that made its way into the code. Let's leave it uncommented until someone notices breakage... :wink:

Cheers,
Mike

Ryan May wrote:

···

Eric Firing wrote:
  

Anyone have any ideas?
      

I don't, but it appears that the set_clip_path method was introduced in 4817 by Mike D., complete with the commented-out lines.
matplotlib download | SourceForge.net

matplotlib download | SourceForge.net
    
Uncommenting them doesn't seem to break anything and it solves my problem as well. I guess there could be performance impacts so I'll wait for Mike to weigh in.

Ryan

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

Aha -- here from John (in another thread) is why those lines were commented out:

""""

> if midPoint:
> if self.gridOn:
> self.gridline.draw(renderer)
> if self.tick1On:
> self.tick1line.draw(renderer)
> if self.tick2On:
> self.tick2line.draw(renderer)
  
For a little extra color on what is going on here -- we don't want to
automatically clip the tick lines to the axes bounding box because
someone might choose the tick direction 'out'. Since we can't use
graphical clipping, this test is trying to make sure the tick location
is in the view interval before drawing it. You may want to consider a
overridable method 'is_draw_tick' or something along those lines,
which defaults to::

  mtransforms.interval_contains(self.get_view_interval(), self.get_loc())

""""

So, I suppose we'll need to find another solution other than graphical clipping, or a way to do it only when needed to solve the problem at hand (in this thread).

Cheers,
Mike

Michael Droettboom wrote:

···

On Sun, Jul 27, 2008 at 4:24 PM, John Hunter <jdh2358@...149...> wrote:

(Just back from vacation)

That change was long enough ago that I don't remember the reason -- it may have just been a debugging hack that made its way into the code. Let's leave it uncommented until someone notices breakage... :wink:

Cheers,
Mike

Ryan May wrote:
  

Eric Firing wrote:
  

Anyone have any ideas?
      

I don't, but it appears that the set_clip_path method was introduced in 4817 by Mike D., complete with the commented-out lines.
matplotlib download | SourceForge.net

matplotlib download | SourceForge.net
    

Uncommenting them doesn't seem to break anything and it solves my problem as well. I guess there could be performance impacts so I'll wait for Mike to weigh in.

Ryan

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