我想在ggplot
的情节区域外添加10个单独的堆叠线条的文本框。我的文字是t = c("a=1", "b=2", "c=3", ... , "j=10")
,但这些标签与我制作原始data.frame
的{{1}}无关。如何在绘图区域外添加10行?
例如,我想在下图右侧的向量ggplot
周围添加一个文本框:
t
答案 0 :(得分:4)
尝试
def main():
total = 0
print('Welcome to the Dew Drop Inn!')
print('Please enter your choices as y or n.')
print(' ')
cheese = (input('Do you want a grilled cheese? '))
dog = (input('Do you want a hot dog? '))
nacho = (input('Do you want nachos? '))
burger = (input('Do you want a hamburger? '))
grilled_cheese = 5
hot_dog = 5
nachos = 4
hamburger = 6
cheese_burger = 1
if cheese == 'y':
total + grilled_cheese
if dog == 'y':
total + hot_dog
if nacho == 'y':
total + nachos
if burger == 'y':
total + hamburger
the_cheese_please = input('Do you want cheese on that? ')
if the_cheese_please == 'y':
total + cheese_burger
else:
total + 0
print(' ')
print('The total for your food is $',(total),'.')
tip = total * 1.15
main()
答案 1 :(得分:2)