-
-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for dim transforms to set style options #2152
Changes from 70 commits
c6ac9a2
bc6c1d3
1a909df
c503afb
dc27124
073cbf4
1f09d59
ddd5a65
a076722
b2ec022
93d1cbd
a8d515a
5100e5e
09d6ab8
bc2e1cd
b8fdc0b
b5c0191
8f6defa
df80c26
a8276a6
f96674f
d19ca7f
5db683a
5459a16
2e9c216
24873f6
3484fa7
f287c5f
4b6cc37
92927ea
637b8e1
a705574
2c4709d
15b769b
dc3c5fd
67d518a
4f73fbd
b369251
0f8a818
8160286
98218c8
4a6fa7a
1d71f79
232ac40
87411d9
2edbd80
0b15b45
cae455d
b840e21
dfc62ae
15230d1
d68c094
a436a8b
a514bb3
f00860c
b95c018
2cda953
5725053
f4ede90
82808f6
8144864
8f89a0e
5868705
c30e29e
61e6419
5828804
e2700a1
47f65be
4638c2b
040effa
67826db
122d8c0
daffaae
a5f4d46
0a31fe4
3c224af
6981eb9
43a2448
056a0b5
14af370
c23aab1
9973afb
c4c1a3f
0321029
4d167f5
0fe9f8c
d7a4595
01fe7e0
5901768
7e0d7b3
895cb65
79990f5
cc371f1
f2053e5
9dfce9b
785c40a
0680782
acd5f6f
9fb6db8
f13a324
6c4262a
5740075
523e3a1
d047bc8
bdf2598
1663316
2b80840
655fcc3
ebb716a
c5f25cc
00f9de6
43f4aca
a55529e
ec0487c
3086224
f5f5c15
d71c656
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ | |
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"boxwhisker.options(show_legend=False, width=400)" | ||
"boxwhisker.options(show_legend=False, width=600, box_fill_color=('origin', str), cmap='Set1')" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And another tuple... |
||
] | ||
} | ||
], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ | |
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%%opts Curve (color='k') Scatter [color_index=2 size_index=2 scaling_factor=1.4] (cmap='Blues' edgecolors='k')\n", | ||
"%%opts Curve (color='k') Scatter (color='Unemployment' s=dim('Unemployment')*10 cmap='Blues' edgecolors='k')\n", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think 'dim' turns out much more readable than 'op' here; I can immediately see that the size will be set to 10 times the unemployment value. Nice. |
||
"%%opts Overlay [show_frame=True aspect=2, fig_size=250, show_frame=False]\n", | ||
"gdp_curves = macro.to.curve('Year', 'GDP Growth')\n", | ||
"gdp_unem_scatter = macro.to.scatter('Year', ['GDP Growth', 'Unemployment'])\n", | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -77,7 +77,7 @@ | |||||
"metadata": {}, | ||||||
"outputs": [], | ||||||
"source": [ | ||||||
"%%opts VectorField [aspect=1.5 fig_size=200 size_index=3 color_index=3] (pivot='tip') Points (color='black' s=5)\n", | ||||||
"%%opts VectorField [aspect=1.5 fig_size=200 size_index=3] (color='Magnitude' pivot='tip') Points (color='black' s=5)\n", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we be deprecating size_index now?
Suggested change
|
||||||
"hv.VectorField((xs, ys, angle, mag), label=\"pivot='tip'; scales with x view\") * hv.Points((X.flat, Y.flat))" | ||||||
] | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -61,7 +61,7 @@ | |||||
"metadata": {}, | ||||||
"outputs": [], | ||||||
"source": [ | ||||||
"%%opts VectorField [size_index=3] VectorField.A [color_index=2] VectorField.M [color_index=3]\n", | ||||||
"%%opts VectorField [size_index=3] VectorField.A (color='Angle') VectorField.M (color='Magnitude')\n", | ||||||
"hv.VectorField(vector_data, group='A') + hv.VectorField(vector_data, group='M')" | ||||||
] | ||||||
}, | ||||||
|
@@ -78,7 +78,7 @@ | |||||
"metadata": {}, | ||||||
"outputs": [], | ||||||
"source": [ | ||||||
"%%opts VectorField [color_index=2 size_index=3 rescale_lengths=False] (scale=4)\n", | ||||||
"%%opts VectorField [size_index=3 rescale_lengths=False] (scale=4, color='Angle')\n", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"hv.HoloMap({phase: hv.VectorField([x, y,(vector_data[2]+phase)%np.pi*2, vector_data[3]+np.abs(phase)])\n", | ||||||
" for phase in np.linspace(-np.pi,np.pi,5)}, kdims='Phase')" | ||||||
] | ||||||
|
@@ -119,7 +119,7 @@ | |||||
"metadata": {}, | ||||||
"outputs": [], | ||||||
"source": [ | ||||||
"%%opts VectorField [width=500 color_index=3 size_index=3 pivot='tip'] (cmap='fire' scale=0.8) Points (color='black' size=1)\n", | ||||||
"%%opts VectorField [width=500 size_index=3 pivot='tip'] (cmap='fire' scale=0.8 color='Magnitude') Points (color='black' size=1)\n", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"hv.VectorField((xs, ys, angle, mag)) * hv.Points((X.flat, Y.flat))" | ||||||
] | ||||||
}, | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a stray instance of the tuple format...