Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Submodule plots is in `__all__` but not imported in `__init__.py`

Open
#109 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
api

Research direction

Start in the package init.py and compare its all entry for plots with the documented import example. Verify the current behavior of import cmocean followed by cmocean.plots.plot_gallery(). Done means the documented access no longer raises AttributeError.

Written by the indexing model from the issue text.

Description

Hi,

This might be deliberate but it seems that the submodule plots is not imported in the __init__.py but is included in __all__.
I can see there are some optional dependencies for some of the functions but their imports are only inside the concerned functions.

That means that if someone wants to use the plots submodule they would need to explicitly import it, which seems a bit strange when the documentation has this:

import cmocean
cmocean.plots.plot_gallery()

Which currently gives:

AttributeError: module 'cmocean' has no attribute 'plots'
Dominant language
Python
Stars
269
Forks
54
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from matplotlib/cmocean

All issues in matplotlib/cmocean

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.