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 890071e

Browse filesBrowse files
authored
Merge pull request #6726 from tacaswell/mnt_simplify_get_data
MNT: use _get_data_path is cbook
2 parents a2c3344 + 762d895 commit 890071e
Copy full SHA for 890071e

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.