Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 762d895

Browse filesBrowse files
committed
MNT: use _get_data_path is cbook
At request of fedora package maintainers. closes #6536
1 parent c7d7d19 commit 762d895
Copy full SHA for 762d895

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed

‎lib/matplotlib/cbook.py

Copy file name to clipboardExpand all lines: lib/matplotlib/cbook.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,7 @@ def get_sample_data(fname, asfileobj=True):
821821
if matplotlib.rcParams['examples.directory']:
822822
root = matplotlib.rcParams['examples.directory']
823823
else:
824-
root = os.path.join(os.path.dirname(__file__),
825-
"mpl-data", "sample_data")
824+
root = os.path.join(matplotlib._get_data_path(), 'sample_data')
826825
path = os.path.join(root, fname)
827826

828827
if asfileobj:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.