-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add conda-forge mpl_sample_data package to docs #18797
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
Comments
Maybe also in the examples that use it? I went through some stackoverflowing about this earlier today when copy pasting the https://matplotlib.org/3.3.0/gallery/subplots_axes_and_figures/zoom_inset_axes.html#sphx-glr-gallery-subplots-axes-and-figures-zoom-inset-axes-py resulted in an error |
Totally agree! Opened this issue after trying to run your PR to figure out if I could add dashes. |
We should also add a pip command for non-conda users. I did not see a package on pypi. But one can always install directly from the GitHub repository. |
Actually, I think we should just remove the ability to (officially) split the sample data away from the main package, and ask conda to stop doing so as well. Indeed, after #18691 (which was motivated by this goal), the whole sample_data folder is smaller than e.g. most extension modules. diff --git i/setup.cfg.template w/setup.cfg.template
index 00ae11c7a..2e2249974 100644
--- i/setup.cfg.template
+++ w/setup.cfg.template
@@ -20,7 +20,6 @@ license_files = LICENSE/*
# considered optional. All except 'tests' data (meaning the baseline
# image files) are installed by default, but that can be changed here.
#tests = False
-#sample_data = True
[gui_support]
# Matplotlib supports multiple GUI toolkits, known as backends.
diff --git i/setup.py w/setup.py
index 062732097..801e41814 100644
--- i/setup.py
+++ w/setup.py
@@ -58,7 +58,6 @@ mpl_packages = [
setupext.Python(),
setupext.Platform(),
setupext.FreeType(),
- setupext.SampleData(),
setupext.Tests(),
setupext.BackendMacOSX(),
]
diff --git i/setupext.py w/setupext.py
index 074223084..dd355264f 100644
--- i/setupext.py
+++ w/setupext.py
@@ -327,6 +327,7 @@ class Matplotlib(SetupPackage):
'mpl-data/matplotlibrc',
*_pkg_data_helper('matplotlib', 'mpl-data/fonts'),
*_pkg_data_helper('matplotlib', 'mpl-data/images'),
+ *_pkg_data_helper('matplotlib', 'mpl-data/sample_data'),
*_pkg_data_helper('matplotlib', 'mpl-data/stylelib'),
*_pkg_data_helper('matplotlib', 'backends/web_backend'),
'*.dll', # Only actually matters on Windows.
@@ -439,21 +440,6 @@ class Matplotlib(SetupPackage):
yield ext
-class SampleData(OptionalPackage):
- """
- This handles the sample data that ships with matplotlib. It is
- technically optional, though most often will be desired.
- """
- name = "sample_data"
-
- def get_package_data(self):
- return {
- 'matplotlib': [
- *_pkg_data_helper('matplotlib', 'mpl-data/sample_data'),
- ],
- }
-
-
class Tests(OptionalPackage):
name = "tests"
default_config = False (+ corresponding docs) should suffice. |
Is this closed by #19383 ? |
Yes. |
Problem
The sample data is not in the wheels installed by PyPi and the instructions at https://matplotlib.org/users/installing.html#test-data are to grab the data manually.
Solution
There's a matplotlib maintained sample_data package in conda forge that should at the least be mentioned on that page:
The text was updated successfully, but these errors were encountered: