A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mpl-visual-context.readthedocs.io/en/latest/examples/path_effects/test_glow.html below:

Cyberpunk Example — mpl_visual_context 0.9.3 documentation

mpl_visual_context Cyberpunk Example
from mpl_visual_context.patheffects_image_box import AlphaGradient
import numpy as np

import matplotlib.pyplot as plt
import mplcyberpunk

from mpl_visual_context.pe_cyberfunk import GlowStroke
from mpl_visual_context.patheffects import AlphaGradient
# from mpl_visual_context.image_box import AlphaGradient #ImageClipEffect, ArtistBboxAlpha
from matplotlib.patheffects import Normal

plt.style.use("cyberpunk")

fig, ax = plt.subplots(num=1, clear=True)

y1 = [1, 3, 9, 5, 2, 1, 1]
y2 = [4, 5, 5, 7, 10, 8, 6]
(l1,) = ax.plot(y1, marker='o')
(l2,) = ax.plot(y2, marker='o')
ax.set_title("Cyberpunk", fontsize=30)
p1 = ax.fill_between(x=np.arange(len(y1)), y1=y1, y2=0)
p2 = ax.fill_between(x=np.arange(len(y1)), y1=y2, y2=0)

from matplotlib.patheffects import Normal

for l in [l1, l2]:
    l.set_path_effects([GlowStroke()])

pe = [AlphaGradient("0 ^ 0.3")]

for p in [p1, p2]:

    p.set_path_effects(pe)

plt.show()

Total running time of the script: (0 minutes 0.072 seconds)

Gallery generated by Sphinx-Gallery


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4