Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrast_ylim does not work for matplotlib #126

Closed
CalvinChad opened this issue Nov 21, 2021 · 2 comments
Closed

contrast_ylim does not work for matplotlib #126

CalvinChad opened this issue Nov 21, 2021 · 2 comments

Comments

@CalvinChad
Copy link

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
Copy link
Member

josesho commented Nov 22, 2021

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

@josesho josesho closed this as completed Nov 22, 2021
@CalvinChad
Copy link
Author

CalvinChad commented Nov 22, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants