需求描述 HelloSlide是把文本自动转化成幻灯片的软件,在幻灯片中我们有SmartArt:各种各样的几何形状,并且可以自定义大小和颜色,放在幻灯片不同的位置. 为了在我们的软件中实现类似的效果,我封装了一些自定义的组件,因为暂时只需要几何形状,我通过直接继承UIView来实现 代码 class ArcView:UIView{ var mystrokecolor:UIColor //设置笔触颜色 var color : UIColor //设置填充颜色 init(frame:CGRect,c
''' 将前面的知识进行练习 plot,scatter,legend等 ''' import matplotlib.pyplot as plt import numpy as np from matplotlib import cm as cm #定义数据 x = np.linspace(0.5, 3.5, 100) y = np.sin(x) y1 = np.random.rand(100) #scatter图 plt.scatter(x, y1, c = "0.25", label
There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an e