Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created October 11, 2023 16:48
Show Gist options
  • Save quantra-go-algo/36447b2e5d6c706a8ef8001a28d8379f to your computer and use it in GitHub Desktop.
Save quantra-go-algo/36447b2e5d6c706a8ef8001a28d8379f to your computer and use it in GitHub Desktop.
# Set the figure size
plt.figure(figsize=(15,7))
# Plot the R indicator
plt.plot(data.index, data['R'], label = "R")
# Set the title of the graph
plt.title('Time-Adjusted Return of DC', fontsize=16)
# Set the x- and y- axis labels and ticks sizes
plt.xlabel('Year', fontsize=15)
plt.ylabel('R', fontsize=15)
plt.tick_params(axis='both', labelsize=15)
# Set the plot legend location
plt.legend(loc=2, prop={'size': 15}, bbox_to_anchor=(0,1))
plt.savefig('Figures/R_time_series.png', bbox_inches='tight')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment