Skip to content

Latest commit

 

History

104 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GlowPlot

Adds a dark theme to plots and a glow effect to its lines.

To install the package, add the following line to your pyproject.toml file:

[tool.poetry.dependencies]
glow_plot = { git = "https://github.com/neuralprocessing/Glow_Plot.git", branch = "main" }

To use the package, import it as follows:

import glow_plot.effects as  gp

The package contains the following functions:

def apply_glow_effect(glow_intensity: int = 8) -> None:
    """
    Adds a glow effect to the lines of a plot.

    :param glow_intensity: The intensity of the glow effect.
    """
def apply_dark_theme() -> None:
    """
    Applies the dark theme to the plot.

    """

The following example demonstrates how to use the package:

import matplotlib.pyplot as plt
import numpy as np
import glow_plot.effects as gp

x = np.linspace(0, 10, 100)
y = np.sin(x)
z = np.cos(x)
gp.apply_dark_theme()
plt.title('Sin and Cos functions with glow effect')
plt.plot(x, y, label='sin(x)')
plt.plot(x, z, label='cos(x)' , linestyle='dotted')
gp.apply_glow_effect(glow_intensity=12)
plt.show()

The example creates a plot with a dark theme and glowing lines of Sin and Cos. img.png

The glow intensity can be adjusted by changing the value of the glow_intensity parameter in the add_glow_plot function. The default value is 8.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages