-
Notifications
You must be signed in to change notification settings - Fork 0
/
orange_line_ex.py
29 lines (23 loc) · 959 Bytes
/
orange_line_ex.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#============================================================================#
#Python Example - Single, Orange, Line----------------------------------------
#============================================================================#
# Library Load-in-------------------------------------
from plotnine import *
import pandas as pd
# Image Options---------------------------------------
#Set the color
orange_hex = "#FFBB58"
#Set the width
chonk = 10
# Data Creation----------------------------------------
line = pd.DataFrame({"x" : list(range(0,5)),
"y" : 1,
"color" : orange_hex,
"size" : chonk})
# Plot Creation----------------------------------------
orange_line = (ggplot(line, aes("x", "y"))+
geom_path(color = line.loc[:,"color"],
size = line.loc[:,"size"])+
coord_equal(ylim = (0,3), xlim = (0,4)))
#View the plot-----------------------------------------
print(orange_line)