cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

i want to plot multiple data frames from a pandas datafreame

resolver101757
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?

Thanks

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")
    fig.show()
 
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)
    
 
 

0 REPLIES 0
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.