Ejemplo n.º 1
0
def test_binaxis_y():
    p = (ggplot(df, aes('x', 'x')) + geom_dotplot(bins=15, binaxis='y'))

    assert p == 'binaxis_y'
Ejemplo n.º 2
0
def test_stackdir_down():
    p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, stackdir='down'))

    assert p == 'stackdir_down'
Ejemplo n.º 3
0
def test_histodot():
    p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, method='histodot'))

    assert p == 'histodot'
Ejemplo n.º 4
0
def test_stackratio():
    p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, stackratio=.75))

    assert p == 'stackratio'
Ejemplo n.º 5
0
    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'
Ejemplo n.º 6
0
def test_histodot():
    p = (ggplot(df, aes('x'))
         + geom_dotplot(bins=15, method='histodot'))

    assert p == 'histodot'
Ejemplo n.º 7
0
    def test_group_binpositions_all(self):
        p = (self.p
             + geom_dotplot(bins=15, binpositions='all'))

        assert p == 'group_basic'  # Yes same as above
Ejemplo n.º 8
0
    def test_group_binpositions_all(self):
        p = (self.p + geom_dotplot(bins=15, binpositions='all'))

        assert p == 'group_basic'  # Yes same as above
Ejemplo n.º 9
0
def test_stackdir_centerwhole():
    p = (ggplot(df, aes('x'))
         + geom_dotplot(bins=15, stackdir='centerwhole'))

    assert p == 'stackdir_centerwhole'
Ejemplo n.º 10
0
    def test_group_basic(self):
        p = self.p + geom_dotplot(bins=15)

        assert p == 'group_basic'
Ejemplo n.º 11
0
def test_stackdir_down():
    p = (ggplot(df, aes('x'))
         + geom_dotplot(bins=15, stackdir='down'))

    assert p == 'stackdir_down'
Ejemplo n.º 12
0
def test_binaxis_y():
    p = (ggplot(df, aes('x', 'x'))
         + geom_dotplot(bins=15, binaxis='y'))

    assert p == 'binaxis_y'
Ejemplo n.º 13
0
def test_stackratio():
    p = (ggplot(df, aes('x'))
         + geom_dotplot(bins=15, stackratio=.75))

    assert p == 'stackratio'
Ejemplo n.º 14
0
def test_stackdir_centerwhole():
    p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, stackdir='centerwhole'))

    assert p == 'stackdir_centerwhole'
Ejemplo n.º 15
0
    def test_group_stackgroups(self):
        p = (self.p
             + geom_dotplot(bins=15, binpositions='all',
                            stackgroups=True))

        assert p == 'group_stackgroups'
Ejemplo n.º 16
0
    def test_group_basic(self):
        p = self.p + geom_dotplot(bins=15)

        assert p == 'group_basic'
Ejemplo n.º 17
0
    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'
Ejemplo n.º 18
0
    def test_group_stackgroups(self):
        p = (self.p +
             geom_dotplot(bins=15, binpositions='all', stackgroups=True))

        assert p == 'group_stackgroups'
Ejemplo n.º 19
0
# 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)
Ejemplo n.º 20
0
def test_dotdensity():
    p = ggplot(df, aes('x')) + geom_dotplot(bins=15)

    assert p == 'dotdensity'
Ejemplo n.º 21
0
def test_dotdensity():
    p = ggplot(df, aes('x')) + geom_dotplot(bins=15)

    assert p == 'dotdensity'