Skip to content

Commit

Permalink
documentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
florisvb committed Aug 13, 2018
1 parent 5c73cec commit cf8b5bf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions figurefirst/svg_to_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,11 @@ def __getattr__(self,attr):
layout_filename = self.breadcrumb['layout_filename']
layout_key = self.breadcrumb['layout_key']

# wrap custom functions as if they are matplotlib functions and save data to a pickle file
# pickles the function and saves it in the data file
# ONLY APPROPRIATE FOR SMALL SELF CONTAINED FUNCTIONS
# the custom function must follow syntax of (ax, *args, **kwargs), where ax is a matplotlib axis
# wrap custom functions as if they are matplotlib functions
# functions must have form: func(ax, *args, *kwargs)
# Two options:
# (1) Self contained function, which will be pickled into the data file
# (2) String pointing to a package.module.function (package.module.submodule.function okay too)
# syntax: (1) _custom
# (2) first argument is a list
# - if not empty: first element is a unique title,
Expand All @@ -509,7 +510,7 @@ def __getattr__(self,attr):
if attr == '_custom':
def custom_wrapper(*args, **kwargs):
info = args[0]
title = attr[1:]
title = args[1]
args_description = []
if len(info) > 0:
title = info[0]
Expand Down

0 comments on commit cf8b5bf

Please sign in to comment.