Skip to content

Commit ed7ff50

Browse files
committed
remove obsolete keword b=None from plt.grid commands
This chage is suggested by [TianYuanSX](https://github.com/TianYuanSX) in his [comment on issue jinglescode#22](jinglescode#22 (comment)).
1 parent c78fb2e commit ed7ff50

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

project.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def download_data(config):
8181
x = np.arange(0,len(xticks))
8282
plt.xticks(x, xticks, rotation='vertical')
8383
plt.title("Daily close price for " + config["alpha_vantage"]["symbol"] + ", " + display_date_range)
84-
plt.grid(b=None, which='major', axis='y', linestyle='--')
84+
plt.grid(which='major', axis='y', linestyle='--')
8585
plt.show()
8686

8787
class Normalizer():
@@ -149,7 +149,7 @@ def prepare_data_y(x, window_size):
149149
x = np.arange(0,len(xticks))
150150
plt.xticks(x, xticks, rotation='vertical')
151151
plt.title("Daily close prices for " + config["alpha_vantage"]["symbol"] + " - showing training and validation data")
152-
plt.grid(b=None, which='major', axis='y', linestyle='--')
152+
plt.grid(which='major', axis='y', linestyle='--')
153153
plt.legend()
154154
plt.show()
155155

@@ -320,7 +320,7 @@ def run_epoch(dataloader, is_training=False):
320320
xticks = [data_date[i] if ((i%config["plots"]["xticks_interval"]==0 and (num_data_points-i) > config["plots"]["xticks_interval"]) or i==num_data_points-1) else None for i in range(num_data_points)] # make x ticks nice
321321
x = np.arange(0,len(xticks))
322322
plt.xticks(x, xticks, rotation='vertical')
323-
plt.grid(b=None, which='major', axis='y', linestyle='--')
323+
plt.grid(which='major', axis='y', linestyle='--')
324324
plt.legend()
325325
plt.show()
326326

@@ -340,7 +340,7 @@ def run_epoch(dataloader, is_training=False):
340340
xticks = [to_plot_data_date[i] if ((i%int(config["plots"]["xticks_interval"]/5)==0 and (len(to_plot_data_date)-i) > config["plots"]["xticks_interval"]/6) or i==len(to_plot_data_date)-1) else None for i in range(len(to_plot_data_date))] # make x ticks nice
341341
xs = np.arange(0,len(xticks))
342342
plt.xticks(xs, xticks, rotation='vertical')
343-
plt.grid(b=None, which='major', axis='y', linestyle='--')
343+
plt.grid(which='major', axis='y', linestyle='--')
344344
plt.legend()
345345
plt.show()
346346

@@ -379,7 +379,7 @@ def run_epoch(dataloader, is_training=False):
379379
plt.plot(plot_date_test, to_plot_data_y_val_pred, label="Past predicted prices", marker=".", markersize=10, color=config["plots"]["color_pred_val"])
380380
plt.plot(plot_date_test, to_plot_data_y_test_pred, label="Predicted price for next day", marker=".", markersize=20, color=config["plots"]["color_pred_test"])
381381
plt.title("Predicting the close price of the next trading day")
382-
plt.grid(b=None, which='major', axis='y', linestyle='--')
382+
plt.grid(which='major', axis='y', linestyle='--')
383383
plt.legend()
384384
plt.show()
385385

0 commit comments

Comments
 (0)