Skip to main content

A Multi Y axis Plotting Library based on Plotly

Project description

MultiYPlot: A Flexible Multi Y-Axis (A Plotly based Library)

MultiYPlot is a lightweight and intuitive Python library built on top of Plotly Graph Objects, designed to simplify the creation of multi–Y-axis interactive charts.With PolyY, you can easily visualize multiple datasets with different scales on the same figure — without losing clarity, interactivity, or control. The library provides a clean object-oriented interface to build, customize, and update complex figures in just a few lines of code.

Key Features

🔹 Multi Y-Axis Support: Effortlessly plot multiple series with independent Y-axes while maintaining alignment and scale integrity. 🔹 Built on Plotly Graph Objects: Leverages Plotly’s powerful graph_objects module for high-quality, interactive visualization. 🔹 Full Interactivity: Zoom, pan, hover, and toggle traces directly in the figure — no static images or re-renders needed. 🔹 Fine Figure Control: Access and modify each trace, axis, and layout component with full Plotly compatibility. 🔹 Dynamic Trace Management: Add, update, or restyle traces after creation — ideal for data exploration and dashboard integration.

All Plots

Example 1: Energy Industry Data

import polyY.plotly as plot
import pandas as pd

elect = pd.read_csv(r"data\electricity_consumption_data.csv")
x = elect.timestamp
ys = ['power_kwh', 'voltage_v', 'current_a', 'temperature_c', 'reactive_power_kvar']
clrs = ["pink", "magenta", "green", "purple", "orange"]

figure = plot.MakeFigure("Power Consumption Metrics", "plotly_dark")
for i in range(5):
    figure.add_trace(x, elect[ys[i]].to_list(), name=ys[i], kind="line", color=clrs[i])
figure.get_figure().update_layout(width=1500, height=800)

Energy Consumption

Example 2: Oil and Gas Data

import polyY.plotly as plot
import pandas as pd

data = pd.read_csv(r"data\oil and gas.txt", sep="\t")
x = data.Time_Days
ys = ['Gas_Volume', 'Water_Volume_', 'Casing_Pressure_', 'Active_Pressure_', 'Line_Pressure_', 'Calculated_Sandface_Pressure_']
clrs = ["olive", "blue", "magenta", "red", "orange", "green"]

figure = plot.MakeFigure("Oil and Gas Production Metrics", "none")
for i in range(6):
    figure.add_trace(x, data[ys[i]].to_list(), name=ys[i], kind="line", color=clrs[i])
figure.get_figure().update_layout(width=1500, height=800)

Oil and Gas Metrics

Example 3: Weather and Forecast Data

import polyY.plotly as plot
import pandas as pd

data = pd.read_csv(r"data\weather_data_500.csv")
x = data.timestamp
ys = ['humidity_%', 'wind_speed_m_s', 'rainfall_mm', 'solar_radiation_w_m2', 'pressure_hpa', 'temperature_c']
clrs = ["blue", "orange", "green", "magenta", "red", "olive"]

figure = plot.MakeFigure("Weather and Forecast Metrics", "ggplot2")
for i in range(6):
    figure.add_trace(x, data[ys[i]].to_list(), name=ys[i], kind="line", color=clrs[i])
figure.get_figure().update_layout(width=1500, height=800)

Weather Metrics

Example 4: Combo Chart

import polyY.plotly as plot
import pandas as pd

data = pd.read_csv(r"data\oil and gas.txt", sep="\t")
x = data.Time_Days
ys = ['Gas_Volume', 'Water_Volume_', 'Casing_Pressure_', 'Active_Pressure_']
clrs = ["olive", "blue", "magenta", "red"]
types = ["area", "area", "line", "scatter"]

figure = plot.MakeFigure("Combo Chart Example", "none")
for i in range(4):
    figure.add_trace(x, data[ys[i]].to_list(), name=ys[i], kind=types[i], color=clrs[i])
figure.get_figure().update_layout(width=1500, height=800)

Combo Chart

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

polyy-0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

polyy-0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file polyy-0.1.tar.gz.

File metadata

  • Download URL: polyy-0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for polyy-0.1.tar.gz
Algorithm Hash digest
SHA256 57886976b2543b603f57ed60383afffc8d54a3e6b50ab0ecc8c39e2f866b3991
MD5 ddaddab3acd15412b5c30f824b7d2c39
BLAKE2b-256 bd398cd598f72fc576e96f0c375af680756787e9bf8dd0f875a5627161b786f7

See more details on using hashes here.

File details

Details for the file polyy-0.1-py3-none-any.whl.

File metadata

  • Download URL: polyy-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for polyy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 217a1cfea3cbeacbd187a9f58eff2a1b7d650fdcc3defc42d890ede674c9e986
MD5 464c22f18bfabe9775b65e1bf5e74e5b
BLAKE2b-256 b0b11951e3addcdeb03f2e2c51cec64bc76a53efc7cc150c527d002bd88ef0a8

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