Skip to content

Commit 4a30dc6

Browse files
authored
more flexible type of input arguments for px functions (#1768)
Now accepted: lists, numpy arrays, and the `dataframe` argument can be a dict or a numpy array.
1 parent b770468 commit 4a30dc6

File tree

4 files changed

+578
-81
lines changed

4 files changed

+578
-81
lines changed

Diff for: packages/python/plotly/plotly/express/_chart_types.py

+25-25
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def scatter(
7-
data_frame,
7+
data_frame=None,
88
x=None,
99
y=None,
1010
color=None,
@@ -57,7 +57,7 @@ def scatter(
5757

5858

5959
def density_contour(
60-
data_frame,
60+
data_frame=None,
6161
x=None,
6262
y=None,
6363
z=None,
@@ -113,7 +113,7 @@ def density_contour(
113113

114114

115115
def density_heatmap(
116-
data_frame,
116+
data_frame=None,
117117
x=None,
118118
y=None,
119119
z=None,
@@ -167,7 +167,7 @@ def density_heatmap(
167167

168168

169169
def line(
170-
data_frame,
170+
data_frame=None,
171171
x=None,
172172
y=None,
173173
line_group=None,
@@ -212,7 +212,7 @@ def line(
212212

213213

214214
def area(
215-
data_frame,
215+
data_frame=None,
216216
x=None,
217217
y=None,
218218
line_group=None,
@@ -257,7 +257,7 @@ def area(
257257

258258

259259
def bar(
260-
data_frame,
260+
data_frame=None,
261261
x=None,
262262
y=None,
263263
color=None,
@@ -307,7 +307,7 @@ def bar(
307307

308308

309309
def histogram(
310-
data_frame,
310+
data_frame=None,
311311
x=None,
312312
y=None,
313313
color=None,
@@ -364,7 +364,7 @@ def histogram(
364364

365365

366366
def violin(
367-
data_frame,
367+
data_frame=None,
368368
x=None,
369369
y=None,
370370
color=None,
@@ -415,7 +415,7 @@ def violin(
415415

416416

417417
def box(
418-
data_frame,
418+
data_frame=None,
419419
x=None,
420420
y=None,
421421
color=None,
@@ -461,7 +461,7 @@ def box(
461461

462462

463463
def strip(
464-
data_frame,
464+
data_frame=None,
465465
x=None,
466466
y=None,
467467
color=None,
@@ -511,7 +511,7 @@ def strip(
511511

512512

513513
def scatter_3d(
514-
data_frame,
514+
data_frame=None,
515515
x=None,
516516
y=None,
517517
z=None,
@@ -562,7 +562,7 @@ def scatter_3d(
562562

563563

564564
def line_3d(
565-
data_frame,
565+
data_frame=None,
566566
x=None,
567567
y=None,
568568
z=None,
@@ -608,7 +608,7 @@ def line_3d(
608608

609609

610610
def scatter_ternary(
611-
data_frame,
611+
data_frame=None,
612612
a=None,
613613
b=None,
614614
c=None,
@@ -647,7 +647,7 @@ def scatter_ternary(
647647

648648

649649
def line_ternary(
650-
data_frame,
650+
data_frame=None,
651651
a=None,
652652
b=None,
653653
c=None,
@@ -682,7 +682,7 @@ def line_ternary(
682682

683683

684684
def scatter_polar(
685-
data_frame,
685+
data_frame=None,
686686
r=None,
687687
theta=None,
688688
color=None,
@@ -726,7 +726,7 @@ def scatter_polar(
726726

727727

728728
def line_polar(
729-
data_frame,
729+
data_frame=None,
730730
r=None,
731731
theta=None,
732732
color=None,
@@ -766,7 +766,7 @@ def line_polar(
766766

767767

768768
def bar_polar(
769-
data_frame,
769+
data_frame=None,
770770
r=None,
771771
theta=None,
772772
color=None,
@@ -804,7 +804,7 @@ def bar_polar(
804804

805805

806806
def choropleth(
807-
data_frame,
807+
data_frame=None,
808808
lat=None,
809809
lon=None,
810810
locations=None,
@@ -844,7 +844,7 @@ def choropleth(
844844

845845

846846
def scatter_geo(
847-
data_frame,
847+
data_frame=None,
848848
lat=None,
849849
lon=None,
850850
locations=None,
@@ -888,7 +888,7 @@ def scatter_geo(
888888

889889

890890
def line_geo(
891-
data_frame,
891+
data_frame=None,
892892
lat=None,
893893
lon=None,
894894
locations=None,
@@ -930,7 +930,7 @@ def line_geo(
930930

931931

932932
def scatter_mapbox(
933-
data_frame,
933+
data_frame=None,
934934
lat=None,
935935
lon=None,
936936
color=None,
@@ -966,7 +966,7 @@ def scatter_mapbox(
966966

967967

968968
def line_mapbox(
969-
data_frame,
969+
data_frame=None,
970970
lat=None,
971971
lon=None,
972972
color=None,
@@ -997,7 +997,7 @@ def line_mapbox(
997997

998998

999999
def scatter_matrix(
1000-
data_frame,
1000+
data_frame=None,
10011001
dimensions=None,
10021002
color=None,
10031003
symbol=None,
@@ -1035,7 +1035,7 @@ def scatter_matrix(
10351035

10361036

10371037
def parallel_coordinates(
1038-
data_frame,
1038+
data_frame=None,
10391039
dimensions=None,
10401040
color=None,
10411041
labels={},
@@ -1059,7 +1059,7 @@ def parallel_coordinates(
10591059

10601060

10611061
def parallel_categories(
1062-
data_frame,
1062+
data_frame=None,
10631063
dimensions=None,
10641064
color=None,
10651065
labels={},

0 commit comments

Comments
 (0)