Python实现的绘制三维双螺旋线图形功能示例
作者:水之魂2018 时间:2023-02-21 20:37:15
本文实例讲述了Python实现的绘制三维双螺旋线图形功能。分享给大家供大家参考,具体如下:
代码:
# -*- coding:utf-8 -*-
#! python3
#绘制三维双螺旋线
import numpy as np
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d
t=list(range(100,200))
r=[i*np.cos(60+i*360*5) for i in t]
theta=[i*np.sin(60+i*360*5) for i in t]
z=[50*i for i in t]
ax=plt.figure().add_subplot(111,projection ='3d')
ax.scatter(r,theta,z,c='rbrb'*25)
plt.show()
其中t里可以修改绘制点的个数
运行效果如下:
希望本文所述对大家Python程序设计有所帮助。
来源:https://blog.csdn.net/weixin_40198632/article/details/78896614
标签:Python,绘制,图形
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
跨浏览器的本地存储(一):userData behavior
2008-08-05 18:13:00
Python运算符之Inplace运算符的使用教程
2021-09-24 11:32:10
python非标准时间的转换
2022-04-12 17:37:52
Python入门教程之运算符重载详解
2021-10-12 20:15:28
为什么str(float)在Python 3中比Python 2返回更多的数字
2022-11-09 22:55:56
以SortedList为例详解Python的defaultdict对象使用自定义类型的方法
2022-04-07 02:32:28
数据库中聚簇索引与非聚簇索引的区别[图文]
2012-02-25 19:38:23
centos7环境下二进制安装包安装 mysql5.6的方法详解
2024-01-26 23:37:33
python TK库简单应用(实时显示子进程输出)
2023-10-08 23:08:19
![](https://img.aspxhome.com/file/2023/2/78812_0s.png)
Python使用pymysql从MySQL数据库中读出数据的方法
2024-01-26 15:26:24
django mysql数据库及图片上传接口详解
2024-01-15 01:45:50
![](https://img.aspxhome.com/file/2023/2/118022_0s.jpg)
解决pycharm界面不能显示中文的问题
2023-04-08 07:14:03
轻松掌握python设计模式之策略模式
2022-01-19 00:17:15
![](https://img.aspxhome.com/file/2023/3/67843_0s.jpg)
MySQL Installer is running in Community mode 的解决办法
2024-01-19 09:14:54
![](https://img.aspxhome.com/file/2023/4/115574_0s.png)
Python环境下搭建属于自己的pip源的教程
2021-12-19 05:57:54
python数据预处理 :样本分布不均的解决(过采样和欠采样)
2023-08-10 07:03:14
微信小程序自定义底部导航带跳转功能
2024-05-02 17:25:49
![](https://img.aspxhome.com/file/2023/1/129781_0s.jpg)
python性能测试手机号验证码登录压测示例详解
2021-06-05 13:21:25
python logging 重复写日志问题解决办法详解
2021-04-29 13:19:30
JS实现在文本指定位置插入内容的简单示例
2024-04-19 10:15:17