cyberosa commited on
Commit
65bcd7c
·
1 Parent(s): e3d270f

renaming Figure variable:

Browse files
Files changed (1) hide show
  1. tabs/invalid_markets.py +4 -4
tabs/invalid_markets.py CHANGED
@@ -63,10 +63,10 @@ def plotly_daily_nr_invalid_markets(invalid_trades: pd.DataFrame) -> gr.Plot:
63
  print("head of daily invalid markets")
64
  print(daily_invalid_markets.head())
65
  # Create the Plotly figure
66
- fig = go.Figure()
67
 
68
  # Add the line trace
69
- fig.add_trace(
70
  go.Scatter(
71
  x=daily_invalid_markets["creation_date"],
72
  y=daily_invalid_markets["nr_markets"],
@@ -80,7 +80,7 @@ def plotly_daily_nr_invalid_markets(invalid_trades: pd.DataFrame) -> gr.Plot:
80
  )
81
 
82
  # Customize the layout
83
- fig.update_layout(
84
  title="Daily Invalid Markets",
85
  xaxis_title="Market Creation Date",
86
  yaxis_title="Number of Markets",
@@ -94,7 +94,7 @@ def plotly_daily_nr_invalid_markets(invalid_trades: pd.DataFrame) -> gr.Plot:
94
  # template="plotly_white", # Optional: set a cleaner background
95
  )
96
  return gr.Plot(
97
- value=fig,
98
  )
99
 
100
 
 
63
  print("head of daily invalid markets")
64
  print(daily_invalid_markets.head())
65
  # Create the Plotly figure
66
+ invalid_fig = go.Figure()
67
 
68
  # Add the line trace
69
+ invalid_fig.add_trace(
70
  go.Scatter(
71
  x=daily_invalid_markets["creation_date"],
72
  y=daily_invalid_markets["nr_markets"],
 
80
  )
81
 
82
  # Customize the layout
83
+ invalid_fig.update_layout(
84
  title="Daily Invalid Markets",
85
  xaxis_title="Market Creation Date",
86
  yaxis_title="Number of Markets",
 
94
  # template="plotly_white", # Optional: set a cleaner background
95
  )
96
  return gr.Plot(
97
+ value=invalid_fig,
98
  )
99
 
100