使用散景时,如何设置图形的标题字体大小?
我试过(在ipython笔记本中):
import bokeh.plotting as bp
import numpy as np
bp.output_notebook()
x_points = np.random.rand(100)
y_points = np.random.rand(100)
bp.figure(title='My Title', x_axis_label='X axis', y_axis_label='Y axis', \
text_font_size='8pt')
bp.scatter(x_points, y_points)
bp.show()
Run Code Online (Sandbox Code Playgroud)
我已经尝试过text_font_size,label_text_font,title_font_size等.文档中的所有信息都在哪里?
我在python中有一个类似于以下的函数:
def checkargs(*args):
if len(args) == 1:
x = args
y = something
elif len(args) == 2:
x, y = args
return x, y
Run Code Online (Sandbox Code Playgroud)
当我只输入一个参数(一个字符串)时,x作为一个元组出现.当我输入两个参数(两个字符串)时,x和y作为字符串返回.如果我只输入一个参数,我怎么能把x作为字符串出来?