Skip to content

Conversation

@benjaminleroy
Copy link
Owner

@benjaminleroy benjaminleroy commented Aug 20, 2022

This doesn't pass patch tests as we're working on the full update.

Has added

  1. plotnine theme attributes for cow_text, cow_title, cow_subtitle, cow_captionandcow_tag`.
  2. annotation object to store things like titles and tag structures

…ement_text tracking, transfered show and save from base image, missing some tests & functionality, and needs fuller connection to preventative erroring as seen in cow.patch
else:
out.append(xi)
return out

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roman numeral and alphabet for auto tags

"1/height_scale assoicated with failed plot(s) (v2.2 - 2 plot failed)"

# global savings and showing and creating ------
def test_patch__get_grob_tag_ordering():
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new test for the _get_grob_tag_ordering function

"grobs can be passed through the grobs parameter indirectly"

def test_patch__size_dive():
def test_patch__estimate_default_min_desired_size_NoAnnotation():
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just a different test

self.__layout = other
elif inherits(other, annotation):
raise ValueError("currently not implimented addition with annotation")
if self.annotation is None:
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update to take in annotation object internally

raise ValueError("currently not implimented addition with annotation")
if self.annotation is None:
other_copy = copy.deepcopy(other)
other_copy._clean_up_attributes()
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the _clean_up_attributes allows special overriding & emptying of values when we add different annotation classes together

def __and__(self, other):
raise ValueError("currently not implimented &")

def _get_grob_tag_ordering(self):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in patch object as it interacts with the layout and the annotation tag structure

"""
pass

class cow_text(cow_title, cow_subtitle, cow_caption, cow_tag):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plotnine themeables have a weird inverse class structure - this indicates that cow_title, etc. inherits from cow_text.

def __hash__(self):
return hash(tuple(self.__dict__))

class cow_title(themeable):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new themeables to leverage plotnine's theme structure




def theme_get():
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extension to the theme_get in plotnine

return theme_complete(p9.theme_get())


def theme_complete(other):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a cowpatch theme_completer function for plotnine themes

@benjaminleroy benjaminleroy marked this pull request as draft January 28, 2023 22:41
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.

2 participants