juancopi81 commited on
Commit
b9b510f
1 Parent(s): b9119ae

Change sizes in rectangles

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -156,11 +156,11 @@ def sequence_to_pandas_dataframe(sequence):
156
  def dataframe_to_pianoroll_img(df):
157
  fig = plt.figure(figsize=(8, 5))
158
  ax = fig.add_subplot(111)
159
- ax.scatter(df.start_time, df.pitch, c="black")
160
  for _, row in df.iterrows():
161
  ax.add_patch(Rectangle(
162
  (row["start_time"], row["pitch"]),
163
- row["duration"], 0.4, color="white"
164
  ))
165
  plt.xlabel('Seconds', fontsize=18)
166
  plt.ylabel('MIDI pitch', fontsize=16)
 
156
  def dataframe_to_pianoroll_img(df):
157
  fig = plt.figure(figsize=(8, 5))
158
  ax = fig.add_subplot(111)
159
+ ax.scatter(df.start_time, df.pitch, c="white")
160
  for _, row in df.iterrows():
161
  ax.add_patch(Rectangle(
162
  (row["start_time"], row["pitch"]),
163
+ row["duration"], 0.01, color="white"
164
  ))
165
  plt.xlabel('Seconds', fontsize=18)
166
  plt.ylabel('MIDI pitch', fontsize=16)