コード例 #1
0
def test_binaxis_y():
    p = (ggplot(df, aes('x', 'x')) + geom_dotplot(bins=15, binaxis='y'))

    assert p == 'binaxis_y'
コード例 #2
0
def test_stackdir_down():
    p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, stackdir='down'))

    assert p == 'stackdir_down'
コード例 #3
0
def test_histodot():
    p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, method='histodot'))

    assert p == 'histodot'
コード例 #4
0
def test_stackratio():
    p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, stackratio=.75))

    assert p == 'stackratio'
コード例 #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'
コード例 #6
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
def test_histodot():
    p = (ggplot(df, aes('x'))
         + geom_dotplot(bins=15, method='histodot'))

    assert p == 'histodot'
コード例 #7
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
    def test_group_binpositions_all(self):
        p = (self.p
             + geom_dotplot(bins=15, binpositions='all'))

        assert p == 'group_basic'  # Yes same as above
コード例 #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
コード例 #9
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
def test_stackdir_centerwhole():
    p = (ggplot(df, aes('x'))
         + geom_dotplot(bins=15, stackdir='centerwhole'))

    assert p == 'stackdir_centerwhole'
コード例 #10
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
    def test_group_basic(self):
        p = self.p + geom_dotplot(bins=15)

        assert p == 'group_basic'
コード例 #11
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
def test_stackdir_down():
    p = (ggplot(df, aes('x'))
         + geom_dotplot(bins=15, stackdir='down'))

    assert p == 'stackdir_down'
コード例 #12
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
def test_binaxis_y():
    p = (ggplot(df, aes('x', 'x'))
         + geom_dotplot(bins=15, binaxis='y'))

    assert p == 'binaxis_y'
コード例 #13
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
def test_stackratio():
    p = (ggplot(df, aes('x'))
         + geom_dotplot(bins=15, stackratio=.75))

    assert p == 'stackratio'
コード例 #14
0
def test_stackdir_centerwhole():
    p = (ggplot(df, aes('x')) + geom_dotplot(bins=15, stackdir='centerwhole'))

    assert p == 'stackdir_centerwhole'
コード例 #15
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
    def test_group_stackgroups(self):
        p = (self.p
             + geom_dotplot(bins=15, binpositions='all',
                            stackgroups=True))

        assert p == 'group_stackgroups'
コード例 #16
0
    def test_group_basic(self):
        p = self.p + geom_dotplot(bins=15)

        assert p == 'group_basic'
コード例 #17
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
    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'
コード例 #18
0
    def test_group_stackgroups(self):
        p = (self.p +
             geom_dotplot(bins=15, binpositions='all', stackgroups=True))

        assert p == 'group_stackgroups'
コード例 #19
0
ファイル: titanic.py プロジェクト: joaodonatosilva/titanic
# 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)
コード例 #20
0
def test_dotdensity():
    p = ggplot(df, aes('x')) + geom_dotplot(bins=15)

    assert p == 'dotdensity'
コード例 #21
0
ファイル: test_geom_dotplot.py プロジェクト: jwhendy/plotnine
def test_dotdensity():
    p = ggplot(df, aes('x')) + geom_dotplot(bins=15)

    assert p == 'dotdensity'