Skip to content

mo-anon/curve-matplotlib-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Curve Finance Matplotlib Theme

A professional matplotlib theme for Curve Finance visualizations with subtle branding and clean styling.

🎨 Features

  • Curve Finance brand colors - Professional orange and blue palette
  • Subtle watermark - Tiny Curve logo for branding
  • Clean styling - Grid, spines, fonts optimized for financial data
  • Easy to use - One-line theme application
  • Comprehensive - Works with all matplotlib chart types

📦 Installation

From PyPI (when published)

pip install curve-matplotlib-theme

From GitHub

pip install git+https://github.com/mo-anon/curve-matplotlib-theme.git

Local Development

git clone https://github.com/mo-anon/curve-matplotlib-theme.git
cd curve-matplotlib-theme
pip install -e .

🚀 Quick Start

Basic Usage (Recommended)

from curve_matplotlib_theme import apply_curve_theme
import matplotlib.pyplot as plt
import numpy as np

# Apply the theme (adds styling + watermark automatically)
apply_curve_theme()

# Create your plot
x = np.linspace(0, 10, 100)
y = np.sin(x)

plt.figure(figsize=(10, 6))
plt.plot(x, y, linewidth=2, label='sin(x)')
plt.title('Curve Finance Theme Example')
plt.xlabel('X Values')
plt.ylabel('Y Values')
plt.legend()
plt.show()

Google Colab Usage

# Install in Colab
!pip install git+https://github.com/mo-anon/curve-matplotlib-theme.git

# Import and use
from curve_matplotlib_theme import apply_curve_theme
import matplotlib.pyplot as plt

apply_curve_theme()
# Your plotting code here...

Manual Watermark (Colab Alternative)

from curve_matplotlib_theme import apply_curve_theme, add_curve_watermark
import matplotlib.pyplot as plt

apply_curve_theme()
fig, ax = plt.subplots()
# Your plotting code...
add_curve_watermark(ax)  # Manual watermark for Colab
plt.show()

🎯 Advanced Usage

Custom Plot Styling

from curve_matplotlib_theme import apply_curve_theme, apply_curve_plot_style, get_curve_colors

apply_curve_theme()
colors = get_curve_colors()

fig, ax = plt.subplots()
ax.plot(data, color=colors['primary'])
apply_curve_plot_style(ax)  # Apply grid and spine styling

Available Colors

colors = get_curve_colors()
# colors['primary'] - Main orange
# colors['secondary'] - Blue
# colors['accent'] - Accent blue
# colors['success'] - Green
# colors['warning'] - Yellow
# colors['background'] - Light beige

📊 Chart Types Supported

  • Line charts - Stock prices, TVL, performance
  • Area charts - Filled line charts
  • Scatter plots - Risk-return analysis
  • Bar charts - Volume, comparisons
  • Pie charts - Portfolio allocations
  • Heatmaps - Correlation matrices
  • Multi-panel - Complex financial dashboards

🎨 Theme Features

  • Background: Light beige (#f1edeb)
  • Grid: Subtle horizontal grid lines
  • Spines: Clean, minimal borders
  • Fonts: Professional typography
  • Watermark: Subtle Curve logo branding

🤖 LLM Usage Instructions

For AI assistants and LLMs: Use this theme by installing and applying it as shown above. The theme automatically adds Curve Finance branding and professional styling to all matplotlib plots.

Key Points for LLMs:

  1. Install: pip install git+https://github.com/mo-anon/curve-matplotlib-theme.git
  2. Import: from curve_matplotlib_theme import apply_curve_theme
  3. Apply: Call apply_curve_theme() before creating plots
  4. Result: All plots get Curve branding, colors, and professional styling automatically

For Google Colab:

  • Use manual watermark: add_curve_watermark(ax) if automatic doesn't work
  • See COLAB_WATERMARK_SOLUTION.md for detailed Colab instructions

Copy-Paste Template for LLMs:

# Install the theme
!pip install git+https://github.com/mo-anon/curve-matplotlib-theme.git

# Apply Curve Finance theme
from curve_matplotlib_theme import apply_curve_theme
import matplotlib.pyplot as plt

apply_curve_theme()

# Your plotting code here - will automatically have Curve branding
plt.plot([1, 2, 3, 4], [1, 4, 2, 3])
plt.title('My Chart')
plt.show()

📈 Examples

Check the examples/ directory for comprehensive examples:

  • Stock price analysis
  • TVL charts with event markers
  • Portfolio allocation pie charts
  • Risk-return scatter plots
  • Correlation heatmaps

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🔗 Links


Made with ❤️ for the Curve Finance community

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages