关于此帖子:Removing white space around a saved image in matplotlib
我尝试了从饼图中删除空白的建议,但仍然无法摆脱左右两边的空白,只能去除上下两边的空白。当我将“ ax.axis('equal')”更改为“ off”时,它不起作用,但在所有面上都留有空白。
String[] words = s.split("[\\s\\-.'?,_@!]+");
有人知道问题可能在哪里吗? 我正在使用jupyter笔记本。
提前谢谢!
答案 0 :(得分:0)
这样够好吗?基本上,我所做的就是将import random
def character_setup1():
name = input("What's your name? ")
Favorite_Color = input(f"Hi {name}, now that I know your name what is your favorite color? ")
d = {0: "Green", 1: "Red", 2: "Blue", 3: "Purple", 4: "Yellow", 5: "Orange"}
print(f"interesting {name}, your favorite color is {Favorite_Color} I seriously thought it would be a {random.randint(0, 5)}")
# This is temporary just to run the program
print(character_setup1())
设置为正方形并删除不必要的命令。左侧,右侧和底部仍然留有很小的空白,我不确定为什么会令人沮丧,但是我想您只能使用图形工具(例如GIMP)将其删除例如。
figsize