ACCLAB / dabestr

Data Analysis with Bootstrap Estimation in R
https://acclab.github.io/dabestr
Apache License 2.0
211 stars 34 forks source link

contrast_ylim does not work for matplotlib #126

Closed CalvinChad closed 2 years ago

CalvinChad commented 2 years ago

Hi, Im running the code in jupyter lab (python) in order to produce gardiner-altman plots, but for some reason contrast_ylim does not set the y limits. Am I missing something, or is there an issue?

my_color_palette = {"WT" : "black", "K$_V$2.1$^{OFF}$" : "grey"}

f, axx = plt.subplots(nrows=2, ncols=2, figsize=(7,5),gridspec_kw={'wspace': 0.6, 'hspace':0.5 })

Res = dabest.load(Gxtx_ALL_Mature, idx=("WT","K$_V$2.1$^{OFF}$"),x="rel_cond", y="Res_Mohm",id_col="Cell_ID") Cap = dabest.load(Gxtx_ALL_Mature, idx=("WT","K$_V$2.1$^{OFF}$"),x="rel_cond", y="Cap_pF",id_col="Cell_ID") Rheo = dabest.load(Gxtx_ALL_Mature, idx=("WT","K$_V$2.1$^{OFF}$"),x="rel_cond", y="Rheo_nA",id_col="Cell_ID") RMP = dabest.load(Gxtx_ALL_Mature, idx=("WT","K$_V$2.1$^{OFF}$"),x="rel_cond", y="RMP",id_col="Cell_ID")

Res.hedges_g.plot(ax=axx.flat[0],swarm_label='Resistance (MOhm)', es_marker_size=4, raw_marker_size=3.5,custom_palette=my_color_palette, contrast_label='effect size (Hedges g)', swarm_ylim=(0,60), contrast_ylim=(-1,1)); Cap.hedges_g.plot(ax=axx.flat[1],swarm_label='Capacitance (pF)', es_marker_size=4, raw_marker_size=3.5, custom_palette=my_color_palette, contrast_label='effect size (Hedges g)', swarm_ylim=(0,1000),contrast_ylim=(-1,1)); Rheo.hedges_g.plot(ax=axx.flat[2],swarm_label='Rheobase (nA)', es_marker_size=4, raw_marker_size=3.5, custom_palette=my_color_palette, contrast_label='effect size (Hedges g)', swarm_ylim=(0,4),contrast_ylim=(-1,1)); RMP.hedges_g.plot(ax=axx.flat[3],swarm_label='RMP (mV)', es_marker_size=4, raw_marker_size=3.5, custom_palette=my_color_palette, contrast_label='effect size (Hedges g)',swarm_ylim=(-100,-40), contrast_ylim=(-1,1))

Con_KO_membrane_esPlot ;

josesho commented 2 years ago

Hi @CalvinChad ,

Sorry for the inconvenience, but could you open an issue at https://github.com/ACCLAB/DABEST-Python instead? This issue tracker here is meant for the R package; and this little bit goes a long way in streamlining our responses.

Closing for now.

Thanks, Joses

CalvinChad commented 2 years ago

Hi Joses, No Problem. done. Many thanks, Calvin.


From: Joses W. Ho @.> Sent: 22 November 2021 16:19 To: ACCLAB/dabestr @.> Cc: CalvinChad @.>; Mention @.> Subject: Re: [ACCLAB/dabestr] contrast_ylim does not work for matplotlib (Issue #126)

Hi @CalvinChadhttps://github.com/CalvinChad ,

Sorry for the inconvenience, but could you open an issue at https://github.com/ACCLAB/DABEST-Python instead? This issue tracker here is meant for the R package; and this little bit goes a long way in streamlining our responses.

Closing for now.

Thanks, Joses

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ACCLAB/dabestr/issues/126#issuecomment-975690141, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AH5IFZQFCL3HEBAVRASWT43UNJUQRANCNFSM5IPKC3FA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.