Comments (5)
Also, is there a way to edit the x-axis tick labels? My variable names aren't pretty and I don't like spaces in them so they don't read nicely.
Thanks
from dabest-python.
Is there a recommended way of saving high-res plots with axis titles that are readable.
The easiest way to do this is with seaborn's set
function.
import seaborn as sns
sns.set(style='ticks', font_scale=1.5)
This, however, will scale the font for all text features. To specifically change the axis titles, directly assign the desired font size to matplotlib's rcParams
.
import matplotlib.pyplot as plt
plt.rcParams['axes.labelsize'] = 16
Note that this will set global options for any figures created; if you are generating figures that need a different label size, you will need to reset/reassign the label size before plotting.
Also, is there a way to edit the x-axis tick labels? My variable names aren't pretty and I don't like spaces in them so they don't read nicely.
Consider re-naming your group names in pandas before plotting. To directly 'edit' these, you will need to access the appropriate Axes (see here) and use matplotlib (see here for more details) :
f = two_groups_unpaired.mean_diff.plot();
rawdata_axes = f.axes[0]
effsize_axes = f.axes[1]
rawdata_axes.set_xticklabels(["blue group", "orange!"])
effsize_axes.set_xticklabels(["", "my difference"]) # The xtick is actually plotted at position "1".
Thanks,
Joses
from dabest-python.
Excellent. Thanks @josesho .
from dabest-python.
Sorry, last question on this @josesho ( I know it's closed but oh well)... What about removing the legend. I'm using colors for contrast but not to differentiate things to where a legend is needed. Is there anyway to get rid of it. For reference, I'm trying to do the multi-axis plot in the tutorial and the legends end up underneath the other plots.
Thanks
from dabest-python.
Nevermind... took too long but figured it out.
topleft_axes = axx.flat[0]
topleft_axes.contrast_axes.get_legend().remove()
from dabest-python.
Related Issues (20)
- color_col formatting HOT 2
- pandas version conflicts HOT 2
- Plot ONLY mean diff HOT 1
- Error with dataframes containing non-string column names HOT 3
- Is it possible to get access to the underlying bootstrap samples generated to obtain the 95% CI for ES? HOT 1
- cannot plot the figures HOT 3
- Estimation plot only HOT 1
- Warning: Not all points displayed... HOT 2
- Are multi-group p-values corrected for multiple comparisons? HOT 2
- contrast_ylim does not work for matplotlib HOT 1
- DABEST calculation of median difference CIs often fails HOT 5
- Error in bca.ci(boot.out, conf, index[1L], L = L, t = t.o, t0 = t0.o, : estimated adjustment 'a' is NA HOT 1
- New Release: v2023.02.14
- Error in changing the the linewidth of the lines used to join each pair of observations HOT 1
- Possibility to do mixed model statistics ? HOT 2
- Little problems with the plots HOT 3
- Limitation of paired analysis: Statistics comparing to only one group instead of with each other
- delta_g does not plot together with hedges_g
- Options for plot appearance HOT 2
- cannot plot figure - 'numpy.ndarray' object has no attribute 'categories' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dabest-python.