mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 04:52:07 +00:00
improve bar width of option calls/puts
This commit is contained in:
@@ -351,8 +351,9 @@ def plot_calls_volume_open_interest(
|
||||
df_calls["strike"],
|
||||
df_calls["volume"] + df_calls["openInterest"],
|
||||
color="lightgreen",
|
||||
width=0.45,
|
||||
)
|
||||
plt.bar(df_calls["strike"], df_calls["volume"], color="green")
|
||||
plt.bar(df_calls["strike"], df_calls["volume"], color="green", width=0.45)
|
||||
|
||||
plt.title(f"{ticker} calls volumes for {exp_date} ")
|
||||
plt.legend(["Stock Price", "Open Interest", "Volume"])
|
||||
@@ -443,8 +444,9 @@ def plot_puts_volume_open_interest(
|
||||
df_puts["strike"],
|
||||
-df_puts["volume"] - df_puts["openInterest"],
|
||||
color="pink",
|
||||
width=0.45,
|
||||
)
|
||||
plt.bar(df_puts["strike"], -df_puts["volume"], color="red")
|
||||
plt.bar(df_puts["strike"], -df_puts["volume"], color="red", width=0.45)
|
||||
|
||||
plt.title(f"{ticker} puts volumes for {exp_date} ")
|
||||
plt.legend(["Stock Price", "Open Interest", "Volume"])
|
||||
|
||||
Reference in New Issue
Block a user