cancel
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.
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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group