@@ -2020,130 +2020,115 @@ def test_valid_facet_grid_fig(self):
2020
2020
)
2021
2021
2022
2022
exp_facet_grid = {
2023
- 'data' : [
2024
- {'marker' : {'color' : '#000000' , 'size' : 5 },
2025
- 'mode' : 'markers' ,
2026
- 'type' : 'scatter' ,
2027
- 'x' : [1.8 , 1.8 , 2.0 , 2.0 , 1.8 , 1.8 , 2.0 ],
2028
- 'xaxis' : 'x1' ,
2029
- 'y' : [18 , 21 , 20 , 21 , 18 , 16 , 20 ],
2030
- 'yaxis' : 'y1' },
2031
- {'marker' : {'color' : '#000000' , 'size' : 5 },
2032
- 'mode' : 'markers' ,
2033
- 'type' : 'scatter' ,
2034
- 'x' : [2.8 , 2.8 , 3.1 ],
2035
- 'xaxis' : 'x2' ,
2036
- 'y' : [16 , 18 , 18 ],
2037
- 'yaxis' : 'y1' }
2038
- ],
2039
- 'layout' : {
2040
- 'annotations' : [
2041
- {'font' : {'color' : '#0f0f0f' , 'size' : 13 },
2042
- 'showarrow' : False ,
2043
- 'text' : 4 ,
2044
- 'textangle' : 0 ,
2045
- 'x' : 0.24625 ,
2046
- 'xanchor' : 'center' ,
2047
- 'xref' : 'paper' ,
2048
- 'y' : 1.03 ,
2049
- 'yanchor' : 'middle' ,
2050
- 'yref' : 'paper' },
2051
- {'font' : {'color' : '#0f0f0f' , 'size' : 13 },
2052
- 'showarrow' : False ,
2053
- 'text' : 6 ,
2054
- 'textangle' : 0 ,
2055
- 'x' : 0.7537499999999999 ,
2056
- 'xanchor' : 'center' ,
2057
- 'xref' : 'paper' ,
2058
- 'y' : 1.03 ,
2059
- 'yanchor' : 'middle' ,
2060
- 'yref' : 'paper' },
2061
- {'font' : {'color' : '#000000' , 'size' : 12 },
2062
- 'showarrow' : False ,
2063
- 'text' : 'displ' ,
2064
- 'textangle' : 0 ,
2065
- 'x' : 0.5 ,
2066
- 'xanchor' : 'center' ,
2067
- 'xref' : 'paper' ,
2068
- 'y' : - 0.1 ,
2069
- 'yanchor' : 'middle' ,
2070
- 'yref' : 'paper' },
2071
- {'font' : {'color' : '#000000' , 'size' : 12 },
2072
- 'showarrow' : False ,
2073
- 'text' : 'cty' ,
2074
- 'textangle' : 270 ,
2075
- 'x' : - 0.1 ,
2076
- 'xanchor' : 'center' ,
2077
- 'xref' : 'paper' ,
2078
- 'y' : 0.5 ,
2079
- 'yanchor' : 'middle' ,
2080
- 'yref' : 'paper' }
2081
- ],
2082
- 'height' : 700 ,
2083
- 'legend' : {'bgcolor' : '#efefef' ,
2084
- 'borderwidth' : 1 ,
2085
- 'x' : 1.05 ,
2086
- 'y' : 1 ,
2087
- 'yanchor' : 'top' },
2088
- 'plot_bgcolor' : '#ededed' ,
2089
- 'shapes' : [
2090
- {'fillcolor' : '#d0d0d0' ,
2091
- 'layer' : 'below' ,
2092
- 'line' : {'color' : '#d0d0d0' , 'width' : 1 },
2093
- 'type' : 'rect' ,
2094
- 'x0' : 0.0 ,
2095
- 'x1' : 0.4925 ,
2096
- 'xref' : 'paper' ,
2097
- 'y0' : 1.005 ,
2098
- 'y1' : 1.05 ,
2099
- 'yref' : 'paper' },
2100
- {'fillcolor' : '#d0d0d0' ,
2101
- 'layer' : 'below' ,
2102
- 'line' : {'color' : '#d0d0d0' , 'width' : 1 },
2103
- 'type' : 'rect' ,
2104
- 'x0' : 0.5075 ,
2105
- 'x1' : 1.0 ,
2106
- 'xref' : 'paper' ,
2107
- 'y0' : 1.005 ,
2108
- 'y1' : 1.05 ,
2109
- 'yref' : 'paper' },
2110
- ],
2023
+ 'data' : [{'marker' : {'color' : 'rgba(31, 119, 180, 0.5)' ,
2024
+ 'line' : {'color' : 'darkgrey' , 'width' : 1 },
2025
+ 'size' : 8 },
2026
+ 'mode' : 'markers' ,
2027
+ 'type' : 'scatter' ,
2028
+ 'x' : [1.8 ,
2029
+ 1.8 ,
2030
+ 2.0 ,
2031
+ 2.0 ,
2032
+ 1.8 ,
2033
+ 1.8 ,
2034
+ 2.0 ],
2035
+ 'xaxis' : 'x1' ,
2036
+ 'y' : [18 ,
2037
+ 21 ,
2038
+ 20 ,
2039
+ 21 ,
2040
+ 18 ,
2041
+ 16 ,
2042
+ 20 ],
2043
+ 'yaxis' : 'y1' },
2044
+ {'marker' : {'color' : 'rgba(31, 119, 180, 0.5)' ,
2045
+ 'line' : {'color' : 'darkgrey' , 'width' : 1 },
2046
+ 'size' : 8 },
2047
+ 'mode' : 'markers' ,
2048
+ 'type' : 'scatter' ,
2049
+ 'x' : [2.8 ,
2050
+ 2.8 ,
2051
+ 3.1 ],
2052
+ 'xaxis' : 'x2' ,
2053
+ 'y' : [16 ,
2054
+ 18 ,
2055
+ 18 ],
2056
+ 'yaxis' : 'y1' }],
2057
+ 'layout' : {'annotations' : [{'font' : {'color' : '#0f0f0f' , 'size' : 13 },
2058
+ 'showarrow' : False ,
2059
+ 'text' : 4 ,
2060
+ 'textangle' : 0 ,
2061
+ 'x' : 0.24625 ,
2062
+ 'xanchor' : 'center' ,
2063
+ 'xref' : 'paper' ,
2064
+ 'y' : 1.03 ,
2065
+ 'yanchor' : 'middle' ,
2066
+ 'yref' : 'paper' },
2067
+ {'font' : {'color' : '#0f0f0f' , 'size' : 13 },
2068
+ 'showarrow' : False ,
2069
+ 'text' : 6 ,
2070
+ 'textangle' : 0 ,
2071
+ 'x' : 0.7537499999999999 ,
2072
+ 'xanchor' : 'center' ,
2073
+ 'xref' : 'paper' ,
2074
+ 'y' : 1.03 ,
2075
+ 'yanchor' : 'middle' ,
2076
+ 'yref' : 'paper' },
2077
+ {'font' : {'color' : '#000000' , 'size' : 12 },
2078
+ 'showarrow' : False ,
2079
+ 'text' : 'displ' ,
2080
+ 'textangle' : 0 ,
2081
+ 'x' : 0.5 ,
2082
+ 'xanchor' : 'center' ,
2083
+ 'xref' : 'paper' ,
2084
+ 'y' : - 0.1 ,
2085
+ 'yanchor' : 'middle' ,
2086
+ 'yref' : 'paper' },
2087
+ {'font' : {'color' : '#000000' , 'size' : 12 },
2088
+ 'showarrow' : False ,
2089
+ 'text' : 'cty' ,
2090
+ 'textangle' : 270 ,
2091
+ 'x' : - 0.1 ,
2092
+ 'xanchor' : 'center' ,
2093
+ 'xref' : 'paper' ,
2094
+ 'y' : 0.5 ,
2095
+ 'yanchor' : 'middle' ,
2096
+ 'yref' : 'paper' }],
2097
+ 'height' : 600 ,
2098
+ 'legend' : {'bgcolor' : '#efefef' ,
2099
+ 'borderwidth' : 1 ,
2100
+ 'x' : 1.05 ,
2101
+ 'y' : 1 ,
2102
+ 'yanchor' : 'top' },
2103
+ 'paper_bgcolor' : 'rgb(251, 251, 251)' ,
2111
2104
'showlegend' : False ,
2112
2105
'title' : '' ,
2113
- 'width' : 700 ,
2106
+ 'width' : 600 ,
2114
2107
'xaxis1' : {'anchor' : 'y1' ,
2115
- '___domain' : [0.0 , 0.4925 ],
2116
- 'dtick' : 0.0 ,
2117
- 'gridcolor' : '#ffffff' ,
2118
- 'gridwidth' : 1 ,
2119
- 'range' : [1.0 , 4.0 ],
2120
- 'tickfont' : {'color' : '#969696' , 'size' : 10 },
2121
- 'ticklen' : 4 ,
2122
- 'tickwidth' : 1 ,
2123
- 'zeroline' : False },
2108
+ '___domain' : [0.0 , 0.4925 ],
2109
+ 'dtick' : 0.0 ,
2110
+ 'range' : [0.85 , 4.1575 ],
2111
+ 'ticklen' : 0 ,
2112
+ 'zeroline' : False },
2124
2113
'xaxis2' : {'anchor' : 'free' ,
2125
- '___domain' : [0.5075 , 1.0 ],
2126
- 'dtick' : 0.0 ,
2127
- 'gridcolor' : '#ffffff' ,
2128
- 'gridwidth' : 1 ,
2129
- 'position' : 0.0 ,
2130
- 'range' : [1.0 , 4.0 ],
2131
- 'tickfont' : {'color' : '#969696' , 'size' : 10 },
2132
- 'ticklen' : 4 ,
2133
- 'tickwidth' : 1 ,
2134
- 'zeroline' : False },
2114
+ '___domain' : [0.5075 , 1.0 ],
2115
+ 'dtick' : 0.0 ,
2116
+ 'position' : 0.0 ,
2117
+ 'range' : [0.85 , 4.1575 ],
2118
+ 'ticklen' : 0 ,
2119
+ 'zeroline' : False },
2135
2120
'yaxis1' : {'anchor' : 'x1' ,
2136
- '___domain' : [0.0 , 1.0 ],
2137
- 'dtick' : 0 .0 ,
2138
- 'gridcolor ' : '#ffffff' ,
2139
- 'gridwidth ' : 1 ,
2140
- 'range ' : [ 16.0 , 21.0 ],
2141
- 'tickfont' : { 'color' : '#969696' , 'size' : 10 },
2142
- 'ticklen' : 4 ,
2143
- 'tickwidth' : 1 ,
2144
- 'zeroline' : False }
2145
- }
2146
- }
2121
+ '___domain' : [0.0 , 1.0 ],
2122
+ 'dtick' : 1 .0 ,
2123
+ 'range ' : [ 15.75 , 21.2625 ] ,
2124
+ 'ticklen ' : 0 ,
2125
+ 'zeroline ' : False }}}
2126
+
2127
+ self . assert_dict_equal ( test_facet_grid [ 'data' ][ 0 ] ,
2128
+ exp_facet_grid [ 'data' ][ 0 ])
2129
+
2130
+ self . assert_dict_equal ( test_facet_grid [ 'data' ][ 1 ],
2131
+ exp_facet_grid [ 'data' ][ 1 ])
2147
2132
2148
- self .assertEqual (test_facet_grid ['data ' ], exp_facet_grid [ 'data' ])
2149
- self . assert_dict_equal ( test_facet_grid [ 'layout' ], exp_facet_grid ['layout' ])
2133
+ self .assert_dict_equal (test_facet_grid ['layout ' ],
2134
+ exp_facet_grid ['layout' ])
0 commit comments