Skip to content

Commit

Permalink
updated with multiple plots
Browse files Browse the repository at this point in the history
Pierian-Data committed Apr 23, 2018
1 parent ff4f966 commit d0e5710
Showing 3 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 1-09E-HeatmapExercises/solution8.html

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions 1-09E-HeatmapExercises/temp-plot.html

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions 2-02-ConvertingPlotlyToDash/plotly2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
import numpy as np

app = dash.Dash()

# Creating DATA
np.random.seed(42)
random_x = np.random.randint(1,101,100)
random_y = np.random.randint(1,101,100)

app.layout = html.Div([dcc.Graph(id='scatterplot',
figure = {'data':[
go.Scatter(
x=random_x,
y=random_y,
mode='markers',
marker = {
'size':12,
'color': 'rgb(51,204,153)',
'symbol':'pentagon',
'line':{'width':2}
}
)],
'layout':go.Layout(title='My Scatterplot',
xaxis = {'title':'Some X title'})}
),
dcc.Graph(id='scatterplot2',
figure = {'data':[
go.Scatter(
x=random_x,
y=random_y,
mode='markers',
marker = {
'size':12,
'color': 'rgb(200,204,53)',
'symbol':'pentagon',
'line':{'width':2}
}
)],
'layout':go.Layout(title='Second Plot',
xaxis = {'title':'Some X title'})}
)])

if __name__ == '__main__':
app.run_server()

0 comments on commit d0e5710

Please sign in to comment.