Skip to content

Remove POSSIBLY obsolete hist() code for updating dataLim - #6872

Closed
smheidrich wants to merge 3 commits into
matplotlib:masterfrom
smheidrich:remove_obsolete_hist_datalim_update1
Closed

smheidrich wants to merge 3 commits into
matplotlib:masterfrom
smheidrich:remove_obsolete_hist_datalim_update1

Conversation

@smheidrich

Copy link
Copy Markdown
Contributor

As part of #6669, I'm trying to understand what each piece of code in the hist function does.

I came across a code segment for setting the axes' dataLim to the minimum and maximum bin if bins are given as an explicit sequence. It was introduced as a fix for Debian bug #503148 - the previous behaviour was to use the minimum and maximum non-empty bins for dataLim, which obviously went against the user's wishes if bins were given explicitly.

But as the tests I introduced in a431582 show, even if the code is removed,dataLim seems to get set just fine by other parts of the hist function nowadays.

Can anybody come up with a test case that requires this code fragment to exist? Otherwise I suggest it should be removed, because that would make implementing #6669 slightly easier.

@smheidrich
smheidrich force-pushed the remove_obsolete_hist_datalim_update1 branch from 5c7c380 to 931183f Compare July 31, 2016 19:54
@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jul 31, 2016
@tacaswell

Copy link
Copy Markdown
Member

Nominally 👍

Does this also properly handle all of the stacked/multiple dataset cases?

I would feel better about this if we know where this was getting set now.

The code in question was introduced as a response to Debian bug #503148,
but it seems like other parts of the hist function now do its job.
@smheidrich
smheidrich force-pushed the remove_obsolete_hist_datalim_update1 branch from 931183f to 3a43dd2 Compare August 1, 2016 03:48
@smheidrich

Copy link
Copy Markdown
Contributor Author

Thanks for the tip, multiple datasets is what kills it.

@smheidrich

Copy link
Copy Markdown
Contributor Author

And here is the reason why, for anyone wondering: test image

@QuLogic QuLogic modified the milestones: unassigned, 2.1 (next point release) Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants