Skip to content

Nested calls to rc.context() fail #80

Closed

Description

@lukelbd

You can end up with persistent changes to the rc object if rc.context() statements are nested. Most notably

import proplot as plot
with plot.rc.context(...):
    f, ax = plot.subplots()
    ax.format(...)

fails because ax.format calls rc.context(...) internally. #50 will fix this (I ended up putting some quite tangentially related stuff in that PR... will try to avoid this in the future).

Activity

  1. added this to the Version 1 milestone on Dec 4, 2019
  2. lukelbd commented on Dec 6, 2019

    @lukelbd
    CollaboratorAuthor

    Actually rc.context is completely broken... because Axes.__init__() calls self.format(mode=1) to implement the custom proplot rcParamsLong params (e.g. abc, abc.style, land, land.color, etc.).

  3. lukelbd commented on Dec 19, 2019

    @lukelbd
    CollaboratorAuthor

    Instead of waiting for #50 to be merged, I'll try to copy the changes in #50 unrelated to add_subplot, GeometrySolver, and EdgeStack into the main branch. That will resolve this issue.

    I originally put so much extra stuff in #50 because I thought it would be finished in November; now it looks like it will have to wait until the middle of next year sometime. Learned a hard lesson about dividing up tasks into small PRs.

  4. lukelbd commented on Jan 7, 2020

    @lukelbd
    CollaboratorAuthor

    Closed by #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions