Skip to main content

Matplotlib and Ipywidgets dark theme/styling that fits well with VSCode

Project description

VSCDARK

This is a simple package to provide a matplotlib dark theme that fits well with the Visual Studio Code dark theme. Additionally the package provides features to properly style interactive plots in notebooks.

Usage

Two a matplotlib style and two functions are provided:

The style can be applied using matplotlib's plt.style.use function:

plt.style.use('vscdark.vscdark')

If styling for interactive plots is also desired, the provided set_style function should be used:

def set_style(new_theme: str | None = None, dark: bool | None = None, display_css: bool = True, verbose: bool | None = None) -> None:

This function applies the current theme configuration and potentially changes options.

Arguments:

  • new_theme: The name of the theme to apply. If None, the currently stored theme is reapplied.
  • dark: Only relevant for the interactive CSS. If None, the setting remains unchanged.
  • display_css: Whether to IPython.display the IPython.HTML object that contains the CSS for widgets. It must be displayed somewhere in the notebook to take effect.
  • verbose: If True, the css will contain "Widget CSS Active" to indicate that it is taken into account by the renderer. If None, the setting remains unchanged.

The IPython.HTML object containing the CSS can also directly be accessed using the css function:

def css() -> IPython.HTML:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vscdark-0.3.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vscdark-0.3.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file vscdark-0.3.3.tar.gz.

File metadata

  • Download URL: vscdark-0.3.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.11.5 Windows/10

File hashes

Hashes for vscdark-0.3.3.tar.gz
Algorithm Hash digest
SHA256 6167f24112168c5668db59559690c36daceeeea18bd0bd8b33c36b30495f4921
MD5 0222fd2faffdc981570351543451ce9d
BLAKE2b-256 f4e5c3ebc1b08b85885954f6fbc25fc0fb8e2894fcdc0f4ea89e0c2b3f96846a

See more details on using hashes here.

File details

Details for the file vscdark-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: vscdark-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.11.5 Windows/10

File hashes

Hashes for vscdark-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c146f83a645281b21a0b0e6da3608dd2dec854bd83c5f2f424d326f33b6fc91d
MD5 c02a33e946fa87b0c703b456727e11e5
BLAKE2b-256 667a80805454ee6ca299cc93142d4285f840bb62447a1ffd4017d010e41207dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page