Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
Showing results for 
Search instead for 
Did you mean: 

i want to plot multiple data frames from a pandas datafreame

New Contributor

Hi all,

i want to plot multiple charts from a pandas datafreame. However, when i run the code below it says "Command result size exceeds limit: Exceeded 20971520 bytes (current = 20973124)". If I move line 11 and place at 21 (outside of the function), it runs without error and the last chart is shown. How do I show each chart next to each other so I can run the experiment all at once and save myself time?


import plotly.graph_objects as go
import numpy as np
import time 
from scipy.signal import find_peaks
def plot_peaks(df_peaks,peak):
    fig = go.Figure()
    fig.add_trace(go.Line(x=df_tyz043['Time'], y=df_tyz043['Value'], name='All tempertures')) # all tempertures 
    fig.add_trace(go.Scatter(x=df_peaks['Time'], y=df_peaks['Value'], name='peaks',mode="markers")) # Just the peaks 
    fig.update_layout(title=str(peak) + " peaks of temperture")
trial_peaks = list(range(17, 40)) # peaks to plots 
# experimental run through each find diffferent peaks 
for peak in trial_peaks:
   #code for find peaks would go here 
   # Pass results to plot_peaks 
    plot_peaks(df_peaks, peak)

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!