Beispiel #1
0
df['date'] = pd.date_range('1/1/2015', periods=len(df.index), freq='D')

# default behavior for dataframe input is to plot each numerical column as a line
line = Line(df)

# build the line plots
line0 = Line(df, y=['python', 'pypy', 'jython'],
             title="Interpreters (y=['python', 'pypy', 'jython'])", ylabel='Duration', legend=True)

line1 = Line(df, x='date', y=['python', 'pypy', 'jython'],
             title="Interpreters (x='date', y=['python', 'pypy', 'jython'])", ylabel='Duration', legend=True)

line2 = Line(df, x='date', y=['python', 'pypy', 'jython'],
             dash=['python', 'pypy', 'jython'],
             title="Interpreters (x='date', y, dash=['python', 'pypy', 'jython'])", ylabel='Duration', legend=True)
line2.title_text_font_size = '11pt'

line3 = Line(df, x='date', y=['python', 'pypy', 'jython'],
             dash=['python', 'pypy', 'jython'],
             color=['python', 'pypy', 'jython'],
             title="Interpreters (x='date', y, dash, color=['python', 'pypy', 'jython'])", ylabel='Duration', legend=True)
line3.title_text_font_size = '11pt'

line4 = Line(df, x='date', y=['python', 'pypy', 'jython'],
             dash='test',
             color=['python', 'pypy', 'jython'],
             title="Interpreters (x='date', y, color=['python', 'pypy', 'jython'], dash='test') with tooltips", ylabel='Duration',
             legend=True, tooltips=[('series', '@series'), ('test', '@test')])

output_file("line_multi.html", title="line examples")
Beispiel #2
0
line1 = Line(df,
             x='date',
             y=['python', 'pypy', 'jython'],
             title="Interpreters (x='date', y=['python', 'pypy', 'jython'])",
             ylabel='Duration',
             legend=True)

line2 = Line(
    df,
    x='date',
    y=['python', 'pypy', 'jython'],
    dash=['python', 'pypy', 'jython'],
    title="Interpreters (x='date', y, dash=['python', 'pypy', 'jython'])",
    ylabel='Duration',
    legend=True)
line2.title_text_font_size = '11pt'

line3 = Line(
    df,
    x='date',
    y=['python', 'pypy', 'jython'],
    dash=['python', 'pypy', 'jython'],
    color=['python', 'pypy', 'jython'],
    title=
    "Interpreters (x='date', y, dash, color=['python', 'pypy', 'jython'])",
    ylabel='Duration',
    legend=True)
line3.title_text_font_size = '11pt'

line4 = Line(
    df,