@@ -30,7 +30,7 @@ Trellis plotting interface
30
30
.. code-block :: python
31
31
32
32
from pandas import read_csv
33
- tips_data = read_csv(' tips_data .csv' )
33
+ tips_data = read_csv(' tips .csv' )
34
34
35
35
from the directory where you downloaded the file.
36
36
@@ -50,7 +50,7 @@ RPlot is a flexible API for producing Trellis plots. These plots allow you to ar
50
50
51
51
plt.figure()
52
52
53
- plot = rplot.RPlot(tips_data, x = ' totbill ' , y = ' tip' )
53
+ plot = rplot.RPlot(tips_data, x = ' total_bill ' , y = ' tip' )
54
54
plot.add(rplot.TrellisGrid([' sex' , ' smoker' ]))
55
55
plot.add(rplot.GeomHistogram())
56
56
@@ -63,7 +63,7 @@ In the example above, data from the tips data set is arranged by the attributes
63
63
64
64
plt.figure()
65
65
66
- plot = rplot.RPlot(tips_data, x = ' totbill ' , y = ' tip' )
66
+ plot = rplot.RPlot(tips_data, x = ' total_bill ' , y = ' tip' )
67
67
plot.add(rplot.TrellisGrid([' sex' , ' smoker' ]))
68
68
plot.add(rplot.GeomDensity())
69
69
@@ -76,7 +76,7 @@ Example above is the same as previous except the plot is set to kernel density e
76
76
77
77
plt.figure()
78
78
79
- plot = rplot.RPlot(tips_data, x = ' totbill ' , y = ' tip' )
79
+ plot = rplot.RPlot(tips_data, x = ' total_bill ' , y = ' tip' )
80
80
plot.add(rplot.TrellisGrid([' sex' , ' smoker' ]))
81
81
plot.add(rplot.GeomScatter())
82
82
plot.add(rplot.GeomPolyFit(degree = 2 ))
@@ -90,7 +90,7 @@ The plot above shows that it is possible to have two or more plots for the same
90
90
91
91
plt.figure()
92
92
93
- plot = rplot.RPlot(tips_data, x = ' totbill ' , y = ' tip' )
93
+ plot = rplot.RPlot(tips_data, x = ' total_bill ' , y = ' tip' )
94
94
plot.add(rplot.TrellisGrid([' sex' , ' smoker' ]))
95
95
plot.add(rplot.GeomScatter())
96
96
plot.add(rplot.GeomDensity2D())
@@ -104,7 +104,7 @@ Above is a similar plot but with 2D kernel desnity estimation plot superimposed.
104
104
105
105
plt.figure()
106
106
107
- plot = rplot.RPlot(tips_data, x = ' totbill ' , y = ' tip' )
107
+ plot = rplot.RPlot(tips_data, x = ' total_bill ' , y = ' tip' )
108
108
plot.add(rplot.TrellisGrid([' sex' , ' .' ]))
109
109
plot.add(rplot.GeomHistogram())
110
110
@@ -117,7 +117,7 @@ It is possible to only use one attribute for grouping data. The example above on
117
117
118
118
plt.figure()
119
119
120
- plot = rplot.RPlot(tips_data, x = ' totbill ' , y = ' tip' )
120
+ plot = rplot.RPlot(tips_data, x = ' total_bill ' , y = ' tip' )
121
121
plot.add(rplot.TrellisGrid([' .' , ' smoker' ]))
122
122
plot.add(rplot.GeomHistogram())
123
123
@@ -130,11 +130,11 @@ If the first grouping attribute is not specified the plots will be arranged in a
130
130
131
131
plt.figure()
132
132
133
- plot = rplot.RPlot(tips_data, x = ' totbill ' , y = ' tip' )
133
+ plot = rplot.RPlot(tips_data, x = ' total_bill ' , y = ' tip' )
134
134
plot.add(rplot.TrellisGrid([' .' , ' smoker' ]))
135
135
plot.add(rplot.GeomHistogram())
136
136
137
- plot = rplot.RPlot(tips_data, x = ' tip' , y = ' totbill ' )
137
+ plot = rplot.RPlot(tips_data, x = ' tip' , y = ' total_bill ' )
138
138
plot.add(rplot.TrellisGrid([' sex' , ' smoker' ]))
139
139
plot.add(rplot.GeomPoint(size = 80.0 , colour = rplot.ScaleRandomColour(' day' ), shape = rplot.ScaleShape(' size' ), alpha = 1.0 ))
140
140
0 commit comments