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
%matplotlib inline | |
import matplotlib.pyplot as plt | |
import io | |
fig, ax = plt.subplots() | |
ax.plot([1,2,3]) | |
fig.savefig(io.BytesIO(), format='svg', dpi=fig.dpi) |
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
data = [dict(type='box', | |
y=np.random.randn(40), | |
line=dict(color='green', width=5), | |
marker=dict(color='red', | |
symbol='square', | |
line=dict(width=4))) for iii in range(5)] | |
py.iplot(data, filename='messin') |
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
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
# version: 0.5.13 | |
import plotly | |
py = plotly.plotly('theengineear', 'o9zlr0hy6z') | |
data = [dict(x=[1,2,3], y=[3,2,3])] | |
annotation = dict(text="I'm claustrophobic!", bgcolor='red', pad=10) | |
layout = dict(annotations=[annotation]) | |
py.iplot(data, layout=layout, filename='no annotation pad') |
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
{ | |
errorbar: { | |
type: "y", | |
visible: true, | |
line: { | |
width: 3, | |
color: "rgba(0,0,0,1)" | |
}, | |
wiskerwidth: 3, | |
errorplus: [1], |
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
{ | |
showticklabels: true, | |
autotick: true, | |
ticks: { | |
type: "inside", | |
visible: true, | |
tick0: 0, | |
dtick: 1, | |
length: 5, | |
line: { |
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 os | |
files = [f for f in os.listdir('.') if os.path.isfile(f)] | |
for f in files: | |
if '.py' in f: | |
print "python file:", f |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:e887e6ca7fda0fe7f2781998ff822b9a90470ddd5e8cde57abf469809375cd26" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:13367fc17f46585604ab49d22e782064ca30c2194de01cf51821e89156ad0fcf" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
size = 100 | |
x = linspace(-2*np.pi, 2*np.pi, size) | |
y = linspace(-2*np.pi, 2*np.pi, size) | |
z = empty((size, size)) | |
loop over length of x with (i): | |
loop over length of y with (j): | |
r2 = (x(i)^2 + y(j)^2) | |
z(i,j) = sin(x(i))*cos(y(j))*sin(r2)/log(r2+1) |
OlderNewer