How to add padding #895
Unanswered
thistlillo
asked this question in
Q&A
Replies: 1 comment
-
You need to increase the scale expansion. scale_y_continuous(expand=(0.05, 0, 0.05, 0)) # default values, expand the bottom & top by 5%
scale_y_continuous(expand=(0, 0, 0.075, 0)) # expand the top by 7.5%
scale_y_continuous(expand=(0, 10, 0.075, 0)) # expand the bottom by 10, expand the top by 7.5% |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following code for creating an histogram (I cannot share the data).
and I get this:
![Screenshot 2024-12-05 at 14 36 23](https://private-user-images.githubusercontent.com/6717655/392838489-d1f300e0-25ce-4310-9d94-80defee778f8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjkwNTEsIm5iZiI6MTczOTE2ODc1MSwicGF0aCI6Ii82NzE3NjU1LzM5MjgzODQ4OS1kMWYzMDBlMC0yNWNlLTQzMTAtOWQ5NC04MGRlZmVlNzc4ZjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMDYyNTUxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODY5ZDE0OWFlZWEwZGNlN2NiNDllNmVhOTI0NjRjZDAyNzJlMzAwMmY1OTRhOWVjZTRjOGY0ZmNiMDliMTA5MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.yKrD41Mf150_q7PB84JDjg5bgh9t8pHfomIEdhZXeEo)
Now I would like to add some padding on top of the chart, to have some empty space between the highest number 264 and the border.
I am not able to do it.
I have found a parameter
plot_margin_top
. When I use it I get a bad image and I am not sure that it corresponds to the padding.Can you please help me?
Beta Was this translation helpful? Give feedback.
All reactions