Python matplotlib.path.Path.unit_circle() Examples
The following are 22
code examples of matplotlib.path.Path.unit_circle().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
matplotlib.path.Path
, or try the search function
.
Example #1
Source File: patches.py From matplotlib-4-abaqus with MIT License | 6 votes |
def __init__(self, xy, width, height, angle=0.0, **kwargs): """ *xy* center of ellipse *width* total length (diameter) of horizontal axis *height* total length (diameter) of vertical axis *angle* rotation in degrees (anti-clockwise) Valid kwargs are: %(Patch)s """ Patch.__init__(self, **kwargs) self.center = xy self.width, self.height = width, height self.angle = angle self._path = Path.unit_circle() # Note: This cannot be calculated until this is added to an Axes self._patch_transform = transforms.IdentityTransform()
Example #2
Source File: patches.py From neural-network-animation with MIT License | 6 votes |
def __init__(self, xy, width, height, angle=0.0, **kwargs): """ *xy* center of ellipse *width* total length (diameter) of horizontal axis *height* total length (diameter) of vertical axis *angle* rotation in degrees (anti-clockwise) Valid kwargs are: %(Patch)s """ Patch.__init__(self, **kwargs) self.center = xy self.width, self.height = width, height self.angle = angle self._path = Path.unit_circle() # Note: This cannot be calculated until this is added to an Axes self._patch_transform = transforms.IdentityTransform()
Example #3
Source File: patches.py From Computable with MIT License | 6 votes |
def __init__(self, xy, width, height, angle=0.0, **kwargs): """ *xy* center of ellipse *width* total length (diameter) of horizontal axis *height* total length (diameter) of vertical axis *angle* rotation in degrees (anti-clockwise) Valid kwargs are: %(Patch)s """ Patch.__init__(self, **kwargs) self.center = xy self.width, self.height = width, height self.angle = angle self._path = Path.unit_circle() # Note: This cannot be calculated until this is added to an Axes self._patch_transform = transforms.IdentityTransform()
Example #4
Source File: patches.py From ImageFusion with MIT License | 6 votes |
def __init__(self, xy, width, height, angle=0.0, **kwargs): """ *xy* center of ellipse *width* total length (diameter) of horizontal axis *height* total length (diameter) of vertical axis *angle* rotation in degrees (anti-clockwise) Valid kwargs are: %(Patch)s """ Patch.__init__(self, **kwargs) self.center = xy self.width, self.height = width, height self.angle = angle self._path = Path.unit_circle() # Note: This cannot be calculated until this is added to an Axes self._patch_transform = transforms.IdentityTransform()
Example #5
Source File: test_path.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def test_readonly_path(): path = Path.unit_circle() def modify_vertices(): path.vertices = path.vertices * 2.0 with pytest.raises(AttributeError): modify_vertices()
Example #6
Source File: test_path.py From twitter-stock-recommendation with MIT License | 5 votes |
def test_contains_points_negative_radius(): path = Path.unit_circle() points = [(0.0, 0.0), (1.25, 0.0), (0.9, 0.9)] expected = [True, False, False] result = path.contains_points(points, radius=-0.5) assert np.all(result == expected)
Example #7
Source File: test_path.py From twitter-stock-recommendation with MIT License | 5 votes |
def test_readonly_path(): path = Path.unit_circle() def modify_vertices(): path.vertices = path.vertices * 2.0 with pytest.raises(AttributeError): modify_vertices()
Example #8
Source File: hatch.py From twitter-stock-recommendation with MIT License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)
Example #9
Source File: hatch.py From CogAlg with MIT License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)
Example #10
Source File: test_path.py From coffeegrindsize with MIT License | 5 votes |
def test_contains_points_negative_radius(): path = Path.unit_circle() points = [(0.0, 0.0), (1.25, 0.0), (0.9, 0.9)] expected = [True, False, False] result = path.contains_points(points, radius=-0.5) assert np.all(result == expected)
Example #11
Source File: test_path.py From coffeegrindsize with MIT License | 5 votes |
def test_readonly_path(): path = Path.unit_circle() def modify_vertices(): path.vertices = path.vertices * 2.0 with pytest.raises(AttributeError): modify_vertices()
Example #12
Source File: hatch.py From coffeegrindsize with MIT License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)
Example #13
Source File: hatch.py From ImageFusion with MIT License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)
Example #14
Source File: test_path.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def test_contains_points_negative_radius(): path = Path.unit_circle() points = [(0.0, 0.0), (1.25, 0.0), (0.9, 0.9)] expected = [True, False, False] result = path.contains_points(points, radius=-0.5) assert np.all(result == expected)
Example #15
Source File: hatch.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)
Example #16
Source File: hatch.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)
Example #17
Source File: test_path.py From neural-network-animation with MIT License | 5 votes |
def test_contains_points_negative_radius(): path = Path.unit_circle() points = [(0.0, 0.0), (1.25, 0.0), (0.9, 0.9)] expected = [True, False, False] assert np.all(path.contains_points(points, radius=-0.5) == expected)
Example #18
Source File: test_path.py From neural-network-animation with MIT License | 5 votes |
def test_readonly_path(): path = Path.unit_circle() def modify_vertices(): path.vertices = path.vertices * 2.0 assert_raises(AttributeError, modify_vertices)
Example #19
Source File: hatch.py From neural-network-animation with MIT License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)
Example #20
Source File: hatch.py From matplotlib-4-abaqus with MIT License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)
Example #21
Source File: hatch.py From Mastering-Elasticsearch-7.0 with MIT License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)
Example #22
Source File: hatch.py From Computable with MIT License | 5 votes |
def __init__(self, hatch, density): path = Path.unit_circle() self.shape_vertices = path.vertices self.shape_codes = path.codes Shapes.__init__(self, hatch, density)