8000 Mpl traitlets by tacaswell · Pull Request #4694 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Mpl traitlets #4694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

10000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
resolved some issues, simple pyplot.plot(x,y) works
  • Loading branch information
rmorshea committed Jul 15, 2015
commit 4056c30f1d034aadecc3e3c057e272f24b845d68
45 changes: 38 additions & 7 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,21 @@ class Artist(Configurable):
aname = 'Artist'
zorder = 0


# warn on all : check whether serialize is/isn't required.

# perishable=True ==> set stale = True
_transformSet = Bool(False, serialize=True)
# warn : oInstance used, new TraitType?
transform = oInstance('matplotlib.transforms.Transform',
allow_none=True, serialize=True, perishable=True)
transform = oInstance('matplotlib.transforms.Transform', allow_none=True,
serialize=True, perishable=True)
axes = Instance('matplotlib.axes._axes.Axes',allow_none=True,
serialize=True)
contains = Callable(allow_none=True)
figure = Instance('matplotlib.figure.Figure', allow_none=True,
serialize=True, perishable=True)
visible = Bool(True, perishable=True, serialize=True)
animated = Bool(False, perishable=True, serialize=True)
alpha = Float(allow_none=True, perishable=True, serialize=True)
alpha = Float(None, allow_none=True, perishable=True, serialize=True)
url = Unicode(allow_none=True, serialize=True)
gid = Unicode(allow_none=True, serialize=True)
clipbox = Instance('matplotlib.transforms.BboxBase', allow_none=True,
Expand Down Expand Up @@ -136,9 +135,7 @@ def __init__(self, config=None, parent=None):
self.stale = True
self._pickable = False
self._clippath = None
self._picker = None
# self._oid = 0
# self._propobservers = {}
self._picker = None
self._remove_method = None

self._sketch = rcParams['path.sketch']
Expand Down Expand Up @@ -256,6 +253,13 @@ def _picker_changed(self, name, new):
# warned setters and getters
# - - - - - - - - - - - - - - -

@property
def _contains(self):
return self.contains
@_contains.setter
def _contains(self, value):
self.contains = value

@property
def _transform(self):
#add warn
Expand Down Expand Up @@ -344,6 +348,15 @@ def get_alpha(self):
# add warn
return self.alpha

@property
def _gid(self):
#add warn
return self.gid
@_gid.setter
def _gid(self, value):
# add warn
self.gid = value

def get_gid(self):
"""
Returns the group id
Expand All @@ -360,6 +373,15 @@ def set_gid(self, gid):
# add warn
self.gid = gid

@property
def _clipbox(self):
#add warn
return self.clipbox
@_clipbox.setter
def _clipbox(self, value):
# add warn
self.clipbox = value

def set_clip_box(self, clipbox):
"""
Set the artist's clip :class:`~matplotlib.transforms.Bbox`.
Expand All @@ -374,6 +396,15 @@ def get_clip_box(self):
# add warn
return self.clipbox

@property
def _snap(self):
#add warn
return self.snap
@_snap.setter
def _snap(self, value):
# add warn
self.snap = value

def get_snap(self):
"""
Returns the snap setting which may be:
Expand Down
0