Sort Seaborn Histogram by Count in a Binary Variable
I am working with pandas and seaborn to generate a fairly large barplot. The x axis consists of multiple identifying numbers, while the y axis displays counts. I am trying to order the x axis and sort the barplot in descending order based on counts of a binary variable (which is shown with seaborn barplot’shue
feature.)
Does setting unique axes names in Jupyter notebook matter across different cells?
I’ve been working on a Jupyter notebook for a while and I’ve been naming all of my seaborn/plt plots different names: ax
,ax2
, ax3
,… axn
. I was wondering if this even mattered at all since calling for a plot you defined in another cell returns nothing and I’m under the impression the only time you need different axes names is when you are plotting multiple on one figure, which you would be doing in the same cell. Feels like a silly question I think I already know the answer to, but would appreciate any input. Thanks!