Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ac8672

Browse files
committed
resolved some issues, simple pyplot.plot(x,y) works
1 parent 9c3c639 commit 3ac8672

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

lib/matplotlib/artist.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class Artist(Configurable):
9595
_transformSet = Bool(False, serialize=True)
9696
# warn : oInstance used, new TraitType?
9797
transform = oInstance('matplotlib.transforms.Transform',
98-
serialize=True, perishable=True)
98+
allow_none=True, serialize=True, perishable=True)
9999
axes = Instance('matplotlib.axes._axes.Axes',allow_none=True,
100100
serialize=True)
101101
contains = Callable(allow_none=True)
@@ -112,14 +112,14 @@ class Artist(Configurable):
112112
clipon = Bool(True, perishable=True)
113113
# * setter and getter methods for `self._clippath` could be refactored
114114
# using TraitTypes potentially ==> clippath = ?
115-
label = Union([Unicode(''),Instance('matplotlib.text.Text')],allow_none=True, perishable=True)
115+
label = Union([Unicode(''),Instance('matplotlib.text.Text'),Int()],allow_none=True, perishable=True)
116116
rasterized = Bool(allow_none=True)
117117
_agg_filter = Callable(None,allow_none=True, perishable=True)
118118
eventson = Bool(False)
119119
_sketch = Tuple(rcParams['path.sketch'], allow_none=True,
120120
perishable=True,serialize=True)
121121
_path_effects = List(trait=Instance('matplotlib.patheffects.AbstractPathEffect'),
122-
perishable=True, serialize=True)
122+
allow_none=True, perishable=True, serialize=True)
123123
_propobservers = Dict({}) # a dict from oids to funcs
124124
_oid = Int(0) # an observer id
125125

@@ -256,6 +256,15 @@ def _picker_changed(self, name, new):
256256
# warned setters and getters
257257
# - - - - - - - - - - - - - - -
258258

259+
@property
260+
def _transform(self):
261+
#add warn
262+
return self.transform
263+
@_transform.setter
264+
def _transform(self, value):
265+
# add warn
266+
self.transform = value
267+
259268
def get_transform(self):
260269
# add warn
261270
return self.transform

0 commit comments

Comments
 (0)