Commit 9b0cf72
committed
Preserve points data columns dropped by PointsModel.parse (#615)
PointsModel.parse silently strips columns whose names collide with
reserved spatial-axis names (currently "z"). When _reparse_points
re-registered a points element, a data column named "z" requested via
color="z" was dropped before color lookup ran, producing a misleading
KeyError.
_reparse_points now takes the color column name and re-attaches it
from the source DataFrame when parsing dropped it, so coloring by a
data column that shadows a reserved axis name works.1 parent db17a4f commit 9b0cf72
2 files changed
Lines changed: 54 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
122 | 129 | | |
123 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
124 | 134 | | |
125 | 135 | | |
126 | 136 | | |
| |||
820 | 830 | | |
821 | 831 | | |
822 | 832 | | |
823 | | - | |
| 833 | + | |
824 | 834 | | |
825 | 835 | | |
826 | 836 | | |
| |||
877 | 887 | | |
878 | 888 | | |
879 | 889 | | |
| 890 | + | |
880 | 891 | | |
881 | 892 | | |
882 | 893 | | |
| |||
897 | 908 | | |
898 | 909 | | |
899 | 910 | | |
900 | | - | |
| 911 | + | |
901 | 912 | | |
902 | 913 | | |
903 | 914 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1009 | 1048 | | |
1010 | 1049 | | |
1011 | 1050 | | |
| |||
0 commit comments