Python and python
The example in this article shares the code for implementing the circle function in python for your reference. The specific content is as follows:
#-*-Coding: UTF-8-*-"_ author __= 'du' _ creation_time __= '2017/4 '" import numpy as np import matplotlib. pyplot as plt # This row is used to set the chart style, which can be replaced by # plt. style. use ("mystyle") fig = plt. figure (figsize = (8, 8) ax = fig. add_subplot (111) ax. spines ['left']. set_color ('None') ax. spines ['bottom ']. set_color ('None') ax. spines ['right']. set_color ('None') ax. spines ['top']. set_color ('None') ax. set_xticks ([]) ax. set_yticks ([]) # implementation function theta = np. arange (0, 2 * np. pi + 0.1, 2 * np. pi/1000) x = np. cos (theta) y = np. sin (theta) v = np. linspace (0, 10,100) v. shape = (100, 1) x = v * x y = v * y plt. plot (x, y, color = 'pink ') # plt.savefig('ball1.jpg') plt. show ()
:
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.