Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d0acc28

Browse files
Merge remote-tracking branch 'upstream/master' into Instagram-Follow--NotFollow
2 parents 7f56653 + 056b6b8 commit d0acc28

File tree

26 files changed

+889
-1
lines changed

26 files changed

+889
-1
lines changed

‎.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,4 +678,4 @@ geoip/
678678
test.py
679679
Test/
680680
reddit_tokens.json
681-
scriptcopy.py
681+
scriptcopy.py
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import plotly.graph_objects as go
2+
import numpy as np
3+
4+
# X , Y , Z cordinates
5+
x_cord = np.arange(0, 50, 2)
6+
y_cord = np.arange(0, 50, 2)
7+
z_function = np.sin((x_cord + y_cord)/2)
8+
9+
fig = go.Figure(data=go.Contour(x=x_cord,
10+
y=y_cord,
11+
z=z_function,
12+
colorscale='darkmint',
13+
contours=dict(
14+
showlabels=False, # show labels on contours
15+
labelfont=dict( # label font properties
16+
size=12,
17+
color='white',
18+
)
19+
),
20+
colorbar=dict(
21+
thickness=25,
22+
thicknessmode='pixels',
23+
len=1.0,
24+
lenmode='fraction',
25+
outlinewidth=0,
26+
title='Title',
27+
titleside='right',
28+
titlefont=dict(
29+
size=14,
30+
family='Arial, sans-serif')
31+
32+
),
33+
34+
)
35+
)
36+
37+
fig.update_layout(
38+
title='Contour Plot',
39+
xaxis_title='X Axis Title',
40+
yaxis_title='Y Axis Title',
41+
autosize=False,
42+
width=900,
43+
height=600,
44+
margin=dict(l=50, r=50, b=100, t=100, pad=4)
45+
)
46+
47+
fig.layout.template = 'plotly_dark'
48+
fig.show()
58.9 KB
Loading[フレーム]
19.9 KB
Loading[フレーム]
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from plotly import graph_objects as go
2+
3+
fig = go.Figure()
4+
5+
fig.add_trace(go.Funnel(
6+
name = 'India',
7+
y = ["McDonalds", "Dominoz", "PizzaHut", "Subway" , "MadOverDonuts" , "Keventers"],
8+
x = [150, 140, 40, 50, 40 , 20],
9+
textposition = "inside",
10+
textinfo = "value+percent initial"))
11+
12+
fig.add_trace(go.Funnel(
13+
name = 'Bangladesh',
14+
orientation = "h",
15+
y = ["McDonalds", "Dominoz", "PizzaHut", "Subway"],
16+
x = [50, 60, 40, 30],
17+
textposition = "inside",
18+
textinfo = "value+percent previous"))
19+
20+
fig.add_trace(go.Funnel(
21+
name = 'SriLanka',
22+
orientation = "h",
23+
y = ["McDonalds", "Dominoz", "PizzaHut", "Subway" ,"MadOverDonuts" ],
24+
x = [90, 70, 50, 30, 10],
25+
textposition = "outside",
26+
textinfo = "value+percent total"))
27+
28+
fig.update_layout(
29+
title = "Funnel Chart for Food Sales in Asian Countries",
30+
showlegend = True
31+
)
32+
fig.layout.template = 'plotly_dark'
33+
fig.show()

‎Data-Visualization/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,16 @@ pip install plotly
3535
# Author
3636
[Elita Menezes](https://github.com/ELITA04/)
3737

38+
## 8. Contour Plot
39+
[![contourplot.png](https://i.postimg.cc/DyCHL12x/contourplot.png)](https://postimg.cc/1fqvZnVF)
40+
41+
## 9. Ternary Plot
42+
[![ternaryplot.png](https://i.postimg.cc/Xv5zRh9P/ternaryplot.png)](https://postimg.cc/8F14WZKd)
43+
## 10. Waterfall Chart
44+
[![Water-Fall.png](https://i.postimg.cc/KvspRFNV/Water-Fall.png)](https://postimg.cc/TpgJ4zBq)
45+
## 11. Funnel Chart
46+
[![Funnel-Chart.png](https://i.postimg.cc/503n1Mys/Funnel-Chart.png)](https://postimg.cc/YGv1fZ1F)
47+
48+
49+
# Author
50+
[Divya Rao](https://github.com/dsrao711/)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import plotly.express as px
2+
import plotly.graph_objects as go
3+
4+
df = px.data.election()
5+
6+
fig = go.Figure(go.Scatterternary({
7+
'mode': 'markers',
8+
'a': df['Joly'],
9+
'b': df['Coderre'],
10+
'c': df['Bergeron'],
11+
'marker': {
12+
'color': 'green',
13+
'size': 14,
14+
} ,
15+
16+
}))
17+
fig.update_layout({
18+
'title': 'Ternary Scatter Plot',
19+
'ternary':
20+
{
21+
'sum':1,
22+
'aaxis':{'title': 'Joly', 'min': 0.01, 'linewidth':2, 'ticks':'outside' },
23+
'baxis':{'title': 'Coderre', 'min': 0.01, 'linewidth':2, 'ticks':'outside' },
24+
'caxis':{'title': 'Bergeron', 'min': 0.01, 'linewidth':2, 'ticks':'outside' }
25+
},
26+
'showlegend': False
27+
})
28+
29+
fig.layout.template = 'plotly_dark'
30+
fig.show()
36.3 KB
Loading[フレーム]
5.99 KB
Loading[フレーム]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import plotly.express as px
2+
import plotly.graph_objects as go
3+
4+
fig = go.Figure(go.Waterfall(
5+
name = "20",
6+
orientation = "v",
7+
measure = ["relative", "relative", "relative", "relative", "relative", "total"],
8+
x = ["Exp1", "Exp2", "Exp3", "Exp4", "Exp5", "Exp6"],
9+
textposition = "outside",
10+
text = ["100", "50", "130", "200", "40", "Total"],
11+
y = [100, +50, 130, 200, 40, 0 ],
12+
connector = {"line":{"color":"rgb(63, 63, 63)"}},
13+
increasing = {"marker":{"color":"green"}},
14+
totals = {"marker":{"color":"blue"}}
15+
))
16+
17+
fig.update_layout(
18+
title = "Waterfall Chart",
19+
showlegend = True ,
20+
xaxis_title='X Axis Title',
21+
yaxis_title='Y Axis Title',
22+
)
23+
fig.layout.template = 'plotly_dark'
24+
fig.show()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /