def test_binaxis_y(): p = (ggplot(df, aes('x', 'x')) + geom_dotplot(bins=15, binaxis='y')) assert p == 'binaxis_y'
def test_stackdir_down(): p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, stackdir='down')) assert p == 'stackdir_down'
def test_histodot(): p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, method='histodot')) assert p == 'histodot'
def test_stackratio(): p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, stackratio=.75)) assert p == 'stackratio'
def test_group_stackgroups_binaxis_y(self): p = (self.p + geom_dotplot( bins=15, binpositions='all', stackgroups=True, binaxis='y')) assert p == 'group_stackgroups_binaxis_y'
def test_group_binpositions_all(self): p = (self.p + geom_dotplot(bins=15, binpositions='all')) assert p == 'group_basic' # Yes same as above
def test_stackdir_centerwhole(): p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, stackdir='centerwhole')) assert p == 'stackdir_centerwhole'
def test_group_basic(self): p = self.p + geom_dotplot(bins=15) assert p == 'group_basic'
def test_group_stackgroups(self): p = (self.p + geom_dotplot(bins=15, binpositions='all', stackgroups=True)) assert p == 'group_stackgroups'
def test_group_stackgroups_binaxis_y(self): p = (self.p + geom_dotplot(bins=15, binpositions='all', stackgroups=True, binaxis='y')) assert p == 'group_stackgroups_binaxis_y'
# a10 = train_data.loc[train_data.Age > 0 and train_data.Age < 10]["Survived"] # print(a10) # ----------------------------- DATA VISUALIZATION ----------------------------- plottest = ( p9.ggplot(data=train_data, mapping=p9.aes(x='Survived', fill='Sex')) + p9.geom_bar() + p9.theme_bw() + p9.ggtitle("Primeiro Plot") + p9.xlab('xxx') + p9.ylab('yyy')) print(plottest) plot2 = (p9.ggplot(data=train_data, mapping=p9.aes(x='Survived', fill='Sex')) + p9.geom_bar() + p9.facet_grid(' . ~ Pclass')) print(plot2) plot3 = (p9.ggplot() + p9.geom_point( data=train_data, mapping=p9.aes(x='Age', y='Fare', color='Sex'))) # + p9.geom_line()) print(plot3) test = px.scatter(train_data, x='Age', y='Fare', color="Sex") plot(test) plot4 = (p9.ggplot(data=train_data, mapping=p9.aes(x='Survived', y='Pclass')) + p9.geom_dotplot()) print(plot4)
def test_dotdensity(): p = ggplot(df, aes('x')) + geom_dotplot(bins=15) assert p == 'dotdensity'