GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||
GeezerVison is showing github.com — Bug in Axes.relim when the first line is y_isdata=False and possible fix by mdboom · Pull Request #854 · matplotlib/matplotlib Conversation
Member
You can reproduce the bug with: from matplotlib import pyplot ax = pyplot.axes() ax.axvline(0.5) ax.plot([-0.1, 0, 0.2, 0.1]) ax.relim() ax.autoscale() (ymin, ymax) = ax.get_ylim() print ymin, ymax pyplot.show() Printed ylim is To workaround this problem, I defined the following functions: def _update_line_limits(self, line, updatex=True, updatey=True): p = line.get_path() if p.vertices.size > 0: self.dataLim.update_from_path(p, self.ignore_existing_data_limits, updatex=updatex and line.x_isdata, updatey=updatey and line.y_isdata) if (updatex and line.x_isdata) or (updatey and line.y_isdata): self.ignore_existing_data_limits = False def relim(self): self.dataLim.ignore(True) for (udatex, updatey) in [[True, False], [False, True]]: self.ignore_existing_data_limits = True for line in self.lines: _update_line_limits(self, line, udatex, updatey) for p in self.patches: self._update_patch_limits(p) If you call I have currently have no time for preparing executable development version of matplotlib and its test environment. I will send a pull request at some point when I am ready, but if somebody can "pull" the snippet above and test it, please do that.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. …on transform when doing spine.set_position(). Also includes a testcase for the data locations. …2, which fixes a problem with alpha-blending partially transparent backgrounds. Fixed background colour of PNGs saved with a non-zero opacity. Rotated text element misalignment in Agg …oblem Fixed failing bbox_inches='tight' case when a contour collection is empty …ll be rendered as black. Also fixes test case result that hit this bug Specifically, alters the base, AGG, PDF, PGF, SVG, Cairo, and Mac OS X backends to better enable the use of RGBA color values for both fills and edges. An explicit alpha attribute, if set, will override the alpha channels of the color values. Updates test results, which are now what would be expected. Also fixes a couple bugs with handling of linestyles. …tiple images together. Imsave now preserves the alpha channel. Conflicts: .travis.yml lib/matplotlib/tests/baseline_images/test_png/pngsuite.png lib/matplotlib/tests/test_axes.py Use a subdirectory of $XDG_CONFIG_HOME instead of ~/.matplotlibrc on Linux Added the from_levels_and_colors function.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. Update homepage image [DOC] Mathtext and matshow examples Build the _windowing extension changed URL to the current CSV API for yahoo finance
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't see much point in defining this outside of the null staticmethod. Is there a performance reason?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably not -- just being symmetrical with
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. …est_fix Fixed failing test on python3.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. …er than the unit bounding box.
Merged
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesLabelsProjectsDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |