@CamDavidsonPilon I added all your suggestions. I ran into some trouble incorporating kwargs for the plots. With the addition of kwargs, the use of plot and scatter caused some issues, since the arguments for these don't mesh (s is not in plot). Originally, I planned on using errorbars, which would make my life easier, but the error bars do not work as expected. It is especially problematic for the ratio measures where SD is the SD of the logarithm of the ratio.
If you have any suggestions over the current approach, I am happy to hear them. I haven't thought of another approach that retains kwargs.
Below is some sample code to see what the generated plots look like with kwargs
import matplotlib.pyplot as plt
import zepid as ze
df = ze.load_sample_data(False)
rd = ze.RiskDifference()
rd.fit(df, exposure='art', outcome='dead')
rd.plot() # No kwargs
plt.show()
rd.plot(color='r') # Color only
plt.show()
rd.plot(marker='*', markersize=20, color='r') # Custom markers
plt.show()
@CamDavidsonPilon I added all your suggestions. I ran into some trouble incorporating
kwargs
for the plots. With the addition of kwargs, the use ofplot
andscatter
caused some issues, since the arguments for these don't mesh (s
is not inplot
). Originally, I planned on usingerrorbars
, which would make my life easier, but the error bars do not work as expected. It is especially problematic for the ratio measures where SD is the SD of the logarithm of the ratio.If you have any suggestions over the current approach, I am happy to hear them. I haven't thought of another approach that retains kwargs.
Below is some sample code to see what the generated plots look like with kwargs