python 来自https://plot.ly/matplotlib/plot/

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 来自https://plot.ly/matplotlib/plot/相关的知识,希望对你有一定的参考价值。

# Learn about API authentication here: https://plot.ly/python/getting-started
# Find your api_key here: https://plot.ly/settings/api

import matplotlib.pyplot as plt
import numpy as np
import plotly.plotly as py

colormaps_fig = plt.figure()

num_plots = 10

# Have a look at the colormaps here and decide which one you'd like:
# http://matplotlib.org/1.2.1/examples/pylab_examples/show_colormaps.html
colormap = plt.cm.gist_ncar
plt.gca().set_color_cycle([colormap(i) for i in np.linspace(0, 0.9, num_plots)])

# Plot several different functions...
x = np.arange(10)
labels = []
for i in range(1, num_plots + 1):
    plt.plot(x, i * x + 5 * i)
    labels.append(r'$y = %ix + %i$' % (i, 5*i))
    
plot_url = py.plot_mpl(colormaps_fig, filename='mpl-colormaps')
Copy to clipboard!

以上是关于python 来自https://plot.ly/matplotlib/plot/的主要内容,如果未能解决你的问题,请参考以下文章

plot bar chart using python

Plotly:将多个图形绘制为子图

python3画聚类树图

火车中的平行坐标图

使用 Bottle 将 Plotly 图嵌入网页

Plotly:如何在 Spyder 中显示图表?