Created
November 15, 2017 07:12
-
-
Save vitvakatu/53c471e9d0a33907a5d076f3f669a723 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly | |
from plotly.graph_objs import Scatter, Layout | |
trace1 = Scatter( | |
x = [0, 0.06, 0.0715], | |
y = [236, 38, 0], | |
name = 'n(M)', | |
line = dict( | |
shape = 'linear', | |
width = 3, | |
), | |
) | |
trace2 = Scatter( | |
x = [0, 0.08], | |
y = [1, 2], | |
name = 'I(M)', | |
yaxis = 'y2', | |
line = dict( | |
dash = 'dash', | |
width = 3, | |
), | |
) | |
data = [trace1, trace2] | |
layout = Layout( | |
title = 'Регулировочная и механическая хар-ки', | |
xaxis = dict( | |
title = 'M, Н⋅м', | |
), | |
yaxis = dict( | |
title = 'n, об/мин' | |
), | |
yaxis2 = dict( | |
title = 'I, А', | |
overlaying = 'y', | |
side = 'right', | |
anchor = 'y', | |
), | |
) | |
plotly.offline.plot({ | |
"data": data, | |
"layout": layout | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment