Skip to content

WIP: Contour log extension - #8834

Closed
efiring wants to merge 5 commits into
matplotlib:masterfrom
efiring:contour_log_extension
Closed

efiring wants to merge 5 commits into
matplotlib:masterfrom
efiring:contour_log_extension

Conversation

@efiring

@efiring efiring commented Jul 3, 2017

Copy link
Copy Markdown
Member

This is inspired by, and partially derived from, #8806 by @Tuan333.

  • It removes a restriction on using a LogLocator with the extend kwarg.
  • It modifies the handling of Locator-generated levels so that they minimally span the data range when the extend kwarg is not used, and allocate the last layer(s) to the extended range when extend is used. In other words, they waste no colors.

@efiring efiring changed the title Contour log extension WIP: Contour log extension Jul 3, 2017
@efiring

efiring commented Jul 4, 2017

Copy link
Copy Markdown
Member Author

The contour_hatching test still fails because the gray shades are not the same as they were. I can fix this by regenerating the images, but those images show a much bigger problem: the pdf and svg test images are very different from the png. See #3841. It's not clear to me whether the problem is as described there. In any case, in the test images it looks like the alpha is applied to the hatch in the svg and pdf but not in the png. The result is actually better with the png.

@dstansby dstansby added this to the 2.2 (next next feature release) milestone Aug 4, 2017
@jklymak jklymak modified the milestones: needs sorting, v3.0 May 30, 2018
@jklymak

jklymak commented May 30, 2018

Copy link
Copy Markdown
Member

Popping back into 3 in case @efiring feels inspired... Its also possible some of the alpha inconsistencies have been worked on?

efiring added 5 commits May 30, 2018 09:56
Locator.tick_values() returns levels beyond the data limits.
In the case of LogLocator with a small data range, the overrun
can be large because it is expanding to the decade points.
In addition, no account was being taken of the "extend" kwarg.
With this changeset, the outermost levels will be the miminum
required to include the data interval in the default case, and
will be reduced when "extend" is used so that some of the data
range will fall in the extended sections.  This is expected to
be rare, however; normally the "extend" kwarg would be used only
when levels are explicitly set, not auto-selected with a Locator.
This puts the hatches in the same order as they were in the
reference figure, but the images still don't match because
the gray shades are not the same as they were.

Furthermore, looking at the original reference figures shows
that the pdf and svg backends handle the alpha differently than
the agg backend.  Not sure what to do about that.
@efiring

efiring commented Jun 10, 2018

Copy link
Copy Markdown
Member Author

Closing in favor of #11412.

@efiring efiring closed this Jun 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants