-
Notifications
You must be signed in to change notification settings - Fork 104
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
Update imports and func references to support up to latest matplotlib (3.8.3) #450
Update imports and func references to support up to latest matplotlib (3.8.3) #450
Conversation
I get this error when I call
Matplotlib v3.8.3 |
Hi Kyle @chudlerk! Thanks for pointing this out. I was just trying to get the package to import but clearly didn't do any testing. It's hard to capture the depth of dependency issues here until #413 is merged. Might need to defer to @lukelbd on this, since he has a better idea of what this They do have a There's two spots in
def _context_adjusting(self, cache=True):
"""
Prevent re-running auto layout steps due to draws triggered by figure
resizes. Otherwise can get infinite loops.
"""
kw = {'_is_adjusting': True}
if not cache:
kw['_cachedRenderer'] = None # temporarily ignore it
return context._state_context(self, **kw) I'm less sure of what's going on here and how this needs to be modified for more recent versions. |
@lukelbd , I gave it a little bit of a try today and can't really figure out what the renderer stuff is doing. I have it turned on so you can push commits directly to this if you'd like to try this weekend. |
@chudlerk I've found success on my work stack just pinning |
Thanks Riley @riley-brady! I've got a working environment also by pinning matplotlib that way. At one point I think I had some issues with newer versions of python not working with the old matplotlib version. But everything is working fine with 3.9. |
I was getting some weird errors with:
Where |
Hello, I had the same issue with if self._cachedRenderer:
renderer = self._cachedRenderer to if hasattr(self,'_cachedRenderer') and self._cachedRenderer:
renderer = self._cachedRenderer I was testing some example code: fig,axs = pplt.subplots(nrows=1,ncols=1)
axs.scatter([0,2,3,4],[1,2,4,2]) but now I get a new error:
Unfortunately I can't use Has anyone found a workaround for this? |
@reemagit , in the meantime you can just use a different colormap from that list. It looks like In the meantime:
|
Thanks for the suggestions. With the PR changes and using the standard colormaps it seems to work. I tried understanding why it wouldn't load the colormaps. Posting what I understood below in case it can be useful: I checked and the 'Fire.json' file exists, and proplot is able to load it. However it doesn't get loaded in the global ColormapRegistry so it throws an error. I think this is because the line in matplotlib #setattr(mcm, attr, database) # Line that I removed
setattr(mcm, '_colormaps', database)
setattr(mpl, 'colormaps', mcm._colormaps) In this way the Database is loaded in the global Even after doing this, it still wouldn't find the 'Fire' colormap. Then I saw that the _api.check_in_list(sorted(_colormaps), name=name) The Not sure if my workaround introduced other issues, but it seems to be working so far. Hope this helps. |
Works for me on |
Is this with @reemagit's fixes? Have you tried plotting some stuff? PR head will only fix imports, but not plotting. |
I installed from the commit c0bf6b6 and plotting works without an issue on my end. |
I tried
and got the following error:
I updated this line to |
Running
in JupyterLab throws the cached renderer error:
But running
works just fine. It seems to work if I delete the if statement above. |
@lukelbd are you able to resolve this into a minor patch release? I think we have most of what we need here to get it working. You know the ins and outs of |
Using both of your latest commits 0af21cf and c0bf6b6
I get this error when running in a jupyter notebook. import matplotlib
import proplot as pplt
import numpy as np
matplotlib.use("Agg")
state = np.random.RandomState(51423)
fig = pplt.figure(share=False, refwidth=2.3)
# Colorbars
ax = fig.subplot(121, title="Axes colorbars")
data = state.rand(10, 10)
m = ax.heatmap(data, cmap="dusk")
ax.colorbar(m, loc="r", cmap="viridis")
ax.colorbar(m, loc="t" , cmap="viridis") # title is automatically adjusted
ax.colorbar(m, loc="ll", label="colorbar label", cmap="viridis") # inset colorbar demonstration
# Legends
ax = fig.subplot(122, title="Axes legends", titlepad="0em")
data = (state.rand(10, 5) - 0.5).cumsum(axis=0)
hs = ax.plot(data, lw=3, labels=list("abcde"))
ax.legend(loc="ll", label="legend label") # automatically infer handles and labels
ax.legend(hs, loc="t", ncols=5, frame=False) # automatically infer labels from handles
ax.legend(hs, list("jklmn"), loc="r", ncols=1, frame=False) # manually override labels
fig.format(
abc=True,
xlabel="xlabel",
ylabel="ylabel",
suptitle="Colorbar and legend location demo",
)
fig.savefig("testproplot.png") The error ValueError Traceback (most recent call last)
Cell In[1], [line 14](vscode-notebook-cell:?execution_count=1&line=14)
[12](vscode-notebook-cell:?execution_count=1&line=12) data = state.rand(10, 10)
[13](vscode-notebook-cell:?execution_count=1&line=13) m = ax.heatmap(data, cmap="dusk")
---> [14](vscode-notebook-cell:?execution_count=1&line=14) ax.colorbar(m, loc="r", cmap="viridis")
[15](vscode-notebook-cell:?execution_count=1&line=15) ax.colorbar(m, loc="t" , cmap="viridis") # title is automatically adjusted
[16](vscode-notebook-cell:?execution_count=1&line=16) ax.colorbar(m, loc="ll", label="colorbar label", cmap="viridis") # inset colorbar demonstration
....
ValueError: 'Fire' is not a valid value for cmap; supported values are 'Accent', 'Accent_r', 'Blues', 'Blues_r', 'BrBG', 'BrBG_r', 'BuGn', 'BuGn_r', 'BuPu', 'BuPu_r', 'CMRmap', 'CMRmap_r', 'Dark2', 'Dark2_r', 'GnBu', 'GnBu_r', 'Grays', 'Greens', 'Greens_r', 'Greys', 'Greys_r', 'OrRd', 'OrRd_r', 'Oranges', 'Oranges_r', 'PRGn', 'PRGn_r', 'Paired', 'Paired_r', 'Pastel1', 'Pastel1_r', 'Pastel2', 'Pastel2_r', 'PiYG', 'PiYG_r', 'PuBu', 'PuBuGn', 'PuBuGn_r', 'PuBu_r', 'PuOr', 'PuOr_r', 'PuRd', 'PuRd_r', 'Purples', 'Purples_r', 'RdBu', 'RdBu_r', 'RdGy', 'RdGy_r', 'RdPu', 'RdPu_r', 'RdYlBu', 'RdYlBu_r', 'RdYlGn', 'RdYlGn_r', 'Reds', 'Reds_r', 'Set1', 'Set1_r', 'Set2', 'Set2_r', 'Set3', 'Set3_r', 'Spectral', 'Spectral_r', 'Wistia', 'Wistia_r', 'YlGn', 'YlGnBu', 'YlGnBu_r', 'YlGn_r', 'YlOrBr', 'YlOrBr_r', 'YlOrRd', 'YlOrRd_r', 'afmhot', 'afmhot_r', 'autumn', 'autumn_r', 'binary', 'binary_r', 'bone', 'bone_r', 'brg', 'brg_r', 'bwr', 'bwr_r', 'cividis', 'cividis_r', 'cool', 'cool_r', 'coolwarm', 'coolwarm_r', 'copper', 'copper_r', 'cubehelix', 'cubehelix_r', 'flag', 'flag_r', 'gist_earth', 'gist_earth_r', 'gist_gray', 'gist_gray_r', 'gist_grey', 'gist_heat', 'gist_heat_r', 'gist_ncar', 'gist_ncar_r', 'gist_rainbow', 'gist_rainbow_r', 'gist_stern', 'gist_stern_r', 'gist_yarg', 'gist_yarg_r', 'gist_yerg', 'gnuplot', 'gnuplot2', 'gnuplot2_r', 'gnuplot_r', 'gray', 'gray_r', 'grey', 'hot', 'hot_r', 'hsv', 'hsv_r', 'inferno', 'inferno_r', 'jet', 'jet_r', 'magma', 'magma_r', 'nipy_spectral', 'nipy_spectral_r', 'ocean', 'ocean_r', 'pink', 'pink_r', 'plasma', 'plasma_r', 'prism', 'prism_r', 'rainbow', 'rainbow_r', 'seismic', 'seismic_r', 'spring', 'spring_r', 'summer', 'summer_r', 'tab10', 'tab10_r', 'tab20', 'tab20_r', 'tab20b', 'tab20b_r', 'tab20c', 'tab20c_r', 'terrain', 'terrain_r', 'turbo', 'turbo_r', 'twilight', 'twilight_r', 'twilight_shifted', 'twilight_shifted_r', 'viridis', 'viridis_r', 'winter', 'winter_r' Note that without import matplotlib
matplotlib.use("Agg") I get
Any tips would be much appreciated. |
@Migelo adding
I don't have any issues with colorbars when using |
Unfortunately I just don't know this package too well end-to-end nor |
@Migelo , I'm getting the dreaded colormap registry issue.
import proplot
import xarray as xr
data = xr.DataArray([[1,2,3],[1,2,3]])
data.plot() ---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[4], line 1
----> 1 data.plot()
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/xarray/plot/accessor.py:48, in DataArrayPlotAccessor.__call__(self, **kwargs)
46 @functools.wraps(dataarray_plot.plot, assigned=("__doc__", "__annotations__"))
47 def __call__(self, **kwargs) -> Any:
---> 48 return dataarray_plot.plot(self._da, **kwargs)
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/xarray/plot/dataarray_plot.py:309, in plot(darray, row, col, col_wrap, ax, hue, subplot_kws, **kwargs)
305 plotfunc = hist
307 kwargs["ax"] = ax
--> 309 return plotfunc(darray, **kwargs)
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/xarray/plot/dataarray_plot.py:1627, in _plot2d.<locals>.newplotfunc(***failed resolving arguments***)
1625 if add_labels and "label" not in cbar_kwargs:
1626 cbar_kwargs["label"] = label_from_attrs(darray)
-> 1627 cbar = _add_colorbar(primitive, ax, cbar_ax, cbar_kwargs, cmap_params)
1628 elif cbar_ax is not None or cbar_kwargs:
1629 # inform the user about keywords which aren't used
1630 raise ValueError(
1631 "cbar_ax and cbar_kwargs can't be used with add_colorbar=False."
1632 )
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/xarray/plot/utils.py:724, in _add_colorbar(primitive, ax, cbar_ax, cbar_kwargs, cmap_params)
721 cbar_kwargs.pop("extend")
723 fig = ax.get_figure()
--> 724 cbar = fig.colorbar(primitive, **cbar_kwargs)
726 return cbar
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/figure.py:1280, in FigureBase.colorbar(self, mappable, cax, ax, use_gridspec, **kwargs)
1276 NON_COLORBAR_KEYS = ['fraction', 'pad', 'shrink', 'aspect', 'anchor',
1277 'panchor']
1278 cb_kw = {k: v for k, v in kwargs.items() if k not in NON_COLORBAR_KEYS}
-> 1280 cb = cbar.Colorbar(cax, mappable, **cb_kw)
1282 if not userax:
1283 self.sca(current_ax)
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/_api/deprecation.py:384, in delete_parameter.<locals>.wrapper(*inner_args, **inner_kwargs)
379 @functools.wraps(func)
380 def wrapper(*inner_args, **inner_kwargs):
381 if len(inner_args) <= name_idx and name not in inner_kwargs:
382 # Early return in the simple, non-deprecated case (much faster than
383 # calling bind()).
--> 384 return func(*inner_args, **inner_kwargs)
385 arguments = signature.bind(*inner_args, **inner_kwargs).arguments
386 if is_varargs and arguments.get(name):
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/colorbar.py:384, in Colorbar.__init__(self, ax, mappable, cmap, norm, alpha, values, boundaries, orientation, ticklocation, extend, spacing, ticks, format, drawedges, filled, extendfrac, extendrect, label, location)
381 spine.set_visible(False)
382 self.outline = self.ax.spines['outline'] = _ColorbarSpine(self.ax)
--> 384 self.dividers = collections.LineCollection(
385 [],
386 colors=[mpl.rcParams['axes.edgecolor']],
387 linewidths=[0.5 * mpl.rcParams['axes.linewidth']],
388 clip_on=False)
389 self.ax.add_collection(self.dividers)
391 self._locator = None
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/collections.py:1409, in LineCollection.__init__(self, segments, zorder, **kwargs)
1407 # Unfortunately, mplot3d needs this explicit setting of 'facecolors'.
1408 kwargs.setdefault('facecolors', 'none')
-> 1409 super().__init__(
1410 zorder=zorder,
1411 **kwargs)
1412 self.set_segments(segments)
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/_api/deprecation.py:454, in make_keyword_only.<locals>.wrapper(*args, **kwargs)
448 if len(args) > name_idx:
449 warn_deprecated(
450 since, message="Passing the %(name)s %(obj_type)s "
451 "positionally is deprecated since Matplotlib %(since)s; the "
452 "parameter will become keyword-only %(removal)s.",
453 name=name, obj_type=f"parameter of {func.__name__}()")
--> 454 return func(*args, **kwargs)
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/collections.py:157, in Collection.__init__(self, edgecolors, facecolors, linewidths, linestyles, capstyle, joinstyle, antialiaseds, offsets, offset_transform, norm, cmap, pickradius, hatch, urls, zorder, **kwargs)
97 """
98 Parameters
99 ----------
(...)
154 :doc:`/gallery/misc/zorder_demo` for all defaults and examples.
155 """
156 artist.Artist.__init__(self)
--> 157 cm.ScalarMappable.__init__(self, norm, cmap)
158 # list of un-scaled dash patterns
159 # this is needed scaling the dash pattern by linewidth
160 self._us_linestyles = [(0, None)]
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/cm.py:400, in ScalarMappable.__init__(self, norm, cmap)
398 self.set_norm(norm) # The Normalize instance of this ScalarMappable.
399 self.cmap = None # So that the setter knows we're initializing.
--> 400 self.set_cmap(cmap) # The Colormap instance of this ScalarMappable.
401 #: The last colorbar associated with this ScalarMappable. May be None.
402 self.colorbar = None
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/cm.py:585, in ScalarMappable.set_cmap(self, cmap)
576 """
577 Set the colormap for luminance data.
578
(...)
581 cmap : `.Colormap` or str or None
582 """
583 in_init = self.cmap is None
--> 585 self.cmap = _ensure_cmap(cmap)
586 if not in_init:
587 self.changed()
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/cm.py:723, in _ensure_cmap(cmap)
720 cmap_name = cmap if cmap is not None else mpl.rcParams["image.cmap"]
721 # use check_in_list to ensure type stability of the exception raised by
722 # the internal usage of this (ValueError vs KeyError)
--> 723 _api.check_in_list(sorted(_colormaps), cmap=cmap_name)
724 return mpl.colormaps[cmap_name]
File ~/miniforge3/envs/analysis_py311/lib/python3.11/site-packages/matplotlib/_api/__init__.py:131, in check_in_list(_values, _print_supported_values, **kwargs)
129 if _print_supported_values:
130 msg += f"; supported values are {', '.join(map(repr, values))}"
--> 131 raise ValueError(msg)
ValueError: 'Fire' is not a valid value for cmap; supported values are 'Accent', 'Accent_r', 'Blues', 'Blues_r', 'BrBG', 'BrBG_r', 'BuGn', 'BuGn_r', 'BuPu', 'BuPu_r', 'CMRmap', 'CMRmap_r', 'Dark2', 'Dark2_r', 'GnBu', 'GnBu_r', 'Greens', 'Greens_r', 'Greys', 'Greys_r', 'OrRd', 'OrRd_r', 'Oranges', 'Oranges_r', 'PRGn', 'PRGn_r', 'Paired', 'Paired_r', 'Pastel1', 'Pastel1_r', 'Pastel2', 'Pastel2_r', 'PiYG', 'PiYG_r', 'PuBu', 'PuBuGn', 'PuBuGn_r', 'PuBu_r', 'PuOr', 'PuOr_r', 'PuRd', 'PuRd_r', 'Purples', 'Purples_r', 'RdBu', 'RdBu_r', 'RdGy', 'RdGy_r', 'RdPu', 'RdPu_r', 'RdYlBu', 'RdYlBu_r', 'RdYlGn', 'RdYlGn_r', 'Reds', 'Reds_r', 'Set1', 'Set1_r', 'Set2', 'Set2_r', 'Set3', 'Set3_r', 'Spectral', 'Spectral_r', 'Wistia', 'Wistia_r', 'YlGn', 'YlGnBu', 'YlGnBu_r', 'YlGn_r', 'YlOrBr', 'YlOrBr_r', 'YlOrRd', 'YlOrRd_r', 'afmhot', 'afmhot_r', 'autumn', 'autumn_r', 'binary', 'binary_r', 'bone', 'bone_r', 'brg', 'brg_r', 'bwr', 'bwr_r', 'cividis', 'cividis_r', 'cool', 'cool_r', 'coolwarm', 'coolwarm_r', 'copper', 'copper_r', 'cubehelix', 'cubehelix_r', 'flag', 'flag_r', 'gist_earth', 'gist_earth_r', 'gist_gray', 'gist_gray_r', 'gist_heat', 'gist_heat_r', 'gist_ncar', 'gist_ncar_r', 'gist_rainbow', 'gist_rainbow_r', 'gist_stern', 'gist_stern_r', 'gist_yarg', 'gist_yarg_r', 'gnuplot', 'gnuplot2', 'gnuplot2_r', 'gnuplot_r', 'gray', 'gray_r', 'hot', 'hot_r', 'hsv', 'hsv_r', 'inferno', 'inferno_r', 'jet', 'jet_r', 'magma', 'magma_r', 'nipy_spectral', 'nipy_spectral_r', 'ocean', 'ocean_r', 'pink', 'pink_r', 'plasma', 'plasma_r', 'prism', 'prism_r', 'rainbow', 'rainbow_r', 'seismic', 'seismic_r', 'spring', 'spring_r', 'summer', 'summer_r', 'tab10', 'tab10_r', 'tab20', 'tab20_r', 'tab20b', 'tab20b_r', 'tab20c', 'tab20c_r', 'terrain', 'terrain_r', 'turbo', 'turbo_r', 'twilight', 'twilight_r', 'twilight_shifted', 'twilight_shifted_r', 'viridis', 'viridis_r', 'winter', 'winter_r' |
Hi everyone,
But if I instead replace the last line by:
I do get that "Fire" colormap error (while still having the correct figure). Note that if I specify another colormap such as From there, I am tempted to suggest the following scenario: If you have any clue on whether this is a good path to follow or not, I'm happy to hear!
|
Idk I'm confused. The colormaps are available from matplotlib.cm upon import, without changing rc.
However @lukelbd can we just change the default cmap to "viridis" and merge these changes? That seems to fix remaining errors for now. |
There also seems to have been an important change in matplotlib colormap API in 3.6 or 3.7, with a lot of deprecations, including for EDIT: in colors.py, in _init_cmap_database(), adding the following lines helps:
Then I can execute the following cell and get the proper colormap.
Same as you, except using the newest mpl colormaps API. Still get the colorbar issue, though. |
Just for info, I tried to follow the chain of errors thrown by the 'fire' cmap issue. I think one of the issues comes from the # public access to the colormaps should be via `matplotlib.colormaps`. For now,
# we still create the registry here, but that should stay an implementation
# detail.
_colormaps = ColormapRegistry(_gen_cmap_registry())
globals().update(_colormaps) This last line declare the default list of cmap stored in |
Indeed there is import error for matplotlib==3.9.0 related to this issue. |
I'm not sure what more to do here, honestly. I haven't had the free time to dig deeply into this. We're currently locking a lot of packages at low versions at work to make this work, but at some point that won't be feasible. Please anyone tag me with any branches off this PR with edits/any additional notes and edits I need to make to get over the hump with this PR. I'll see if I can try to get this merged from there. |
I think this PR should be merged. I have proplot working with python 3.11.9 and matplotlib==3.8.4 |
@lukelbd Hi Luke, we are really anticipating the new version of ProPlot, could you please spare some time to merge this PR? |
I just updated the default cmap to Viridis I believe, and messaged Luke privately to see if I could get his eyes on this. |
Hi, thank you very much for the pull request. Unfortunately, I don't think that in the short term, the main developer will want to continue to refine proplot. |
Perhaps we should combine our efforts https://github.com/cvanelteren/proplot/tree/mpl3.8.3 |
There are issues when using cartopy==0.23 and matplotlib==3.9 for geographic plotting. I attempted to fix them, and it was useful for me. |
@cvanelteren Have you made any headway on this? Anything separate from what I've incorporated here? Feel free to target this branch and tag me and I can merge into it. Work has been insane for me lately. Lots of downsizing on my team so haven't been able to think about this at all. We've either version-locked everything to out-of-date environments to use I have connected with @lukelbd. He's similarly slammed with his postdoc. He mentioned he's aware of this and hoping to get a v0.10 release out this summer with the MPL compatibility changes. I let him know how much work/thought people are putting into it here, so hoping he can draw from this thread or advise on it. Again, I'm happy to merge anything into this branch that people find works so folks can do an install targeted at this branch to get higher MPL versions to work before Luke can do a release. |
I have made some headway and implemented some unittests of which this repo is in high need of. Unfortunately with the release of 3.9 there are breaking changes that overhauls the colormaps heavily. Haven't looked into these changes yet. The unittests are key to ensure everything is working. There are plenty of examples in the proplot docs that we can leverage for this end. I think this step is crucial to prevent monkey patching it to work with future versions of mpl and ensure that the role of proplot is still warranted other than a mere mpl style that we could apply. Ofc this requires partly a vision from the original author rather than a mutiny ;-). |
Yes definitely a big need for testing. @lukelbd said this is one of his main priorities. He had been working on that here: #413. It's tough in a package like this. Unit testing can only go so far. But you sort of need snapshot testing since you're ensuring that images align as expected. A healthy mix of both would be good. Hopefully he has some breathing room from academia soon to do a focused effort here. Ideally a few of us can help contribute to get testing up to par. I think we need to set up a CI/CD with nightly testing against upstream package versions + have a suit of tests going along with that that just test against failures due to MPL/cartopy changes in particular. Consolidating my ramble:
Outside of that it would be nice to release this package to a community org with a more broad set of merge permissions to help when Luke is too busy to focus on this for periods of time. |
What's the best route here @cvanelteren? Do you want to just cherry pick anything I have here that you don't have and open a PR here on main targeting your branch? You can link to this thread here and we can continue discussion there. We bought a house and are getting married soon on top of the job craziness, so it's hard for me to drive the ship :) But once we get buy-in from Luke, I should hopefully be able to help a bit with testing stuff. |
I think the best way forward would be to finish small meaningful tasks. In the long run it would be good to get a stable unitsuite going. I am aware of the branch you listed, but am more concerned with the lack of communication on @lukelbd's side. As it currently stands this package is loosing track of the latest changes and makes it harder for people to just install and run it. I think my branch (and perhaps this one too) monkey patches too much in. I would say let's focus on these unittests first so that we can after it, at least have a quicker turn around on what broke with the latest mpl patches. This does require however, @lukelbd to become atleast communicative on these PRs -- after all we cannot proceed to merge and make this package up-to-date without his blessing (and merge powers). Have a look, if time permits, at the unittests I provided. MPL provides a nice way to do it out of the box. |
Agreed on all of that.
I agree that we should avoid this conditional monkey patching. We could have a coordinated effort to just get a unit test suite set up with merge permissions. Then can use that to diagnose what's going on and see if we can get focused attention from Luke. If you open up a targeted branch I should be able to do some light reviewing soon. I am gone all next week for my wedding. Once I'm back I should have more time to review/help with unit testing getting set up. |
I can see if I can make a dent in the unittests -- now tracking this actively on master...cvanelteren:proplot:unittest |
@riley-brady would be lovely if you can arrange this. Again no mutiny is intended -- I really like the place that this package has and would hate to see it go down ;-). |
I have merged the unittests with mine and added some. I think this is a pretty good spot to move forward; will some thoughts about how to proceed in the coming week, perhaps getting some inspiration from mpl. Browsing through their source they don't do particularly sophisticated checks. Could use some input on how to test the internals further (if needed at all). |
Awesome, thanks for pushing this forward! Could you open a PR at https://github.com/cvanelteren/proplot/pulls or https://github.com/proplot-dev/proplot/pulls with your branch? I can't comment on master...cvanelteren:proplot:unittest without it being a targeted PR.
Is this from @lukelbd's other branch or elsewhere? Just clarifying what you are merging in. |
@riley-brady just added it #458. I will have a look at latest mpl to see what changed, then we can skip the intermediate versions for working towards a mpl 3.9.1 release. EDIT: see #459 |
Closing in favor of #458 and #459 :) Thanks @cvanelteren !! |
Please see #459! Until this gets merged in and released as an official version, you can install pip install git+https://github.com/proplot-dev/proplot.git@refs/pull/459/head |
matplotlib==3.6.0
by leveraging_gen_cmap_registry()
to set up colormap database.matplotlib==3.8.3
by referencing hidden_fontconfig_pattern
module for setting up fontconfig parser.