@@ -621,15 +621,15 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
621621 Example 1: Simple Gantt Chart
622622 ```
623623 import plotly.plotly as py
624- from plotly.tools import FigureFactory as FF
624+ from plotly.figure_factory import create_gantt
625625
626626 # Make data for chart
627627 df = [dict(Task="Job A", Start='2009-01-01', Finish='2009-02-30'),
628628 dict(Task="Job B", Start='2009-03-05', Finish='2009-04-15'),
629629 dict(Task="Job C", Start='2009-02-20', Finish='2009-05-30')]
630630
631631 # Create a figure
632- fig = FF. create_gantt(df)
632+ fig = create_gantt(df)
633633
634634 # Plot the data
635635 py.iplot(fig, filename='Simple Gantt Chart', world_readable=True)
@@ -638,7 +638,7 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
638638 Example 2: Index by Column with Numerical Entries
639639 ```
640640 import plotly.plotly as py
641- from plotly.tools import FigureFactory as FF
641+ from plotly.figure_factory import create_gantt
642642
643643 # Make data for chart
644644 df = [dict(Task="Job A", Start='2009-01-01',
@@ -649,9 +649,9 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
649649 Finish='2009-05-30', Complete=95)]
650650
651651 # Create a figure with Plotly colorscale
652- fig = FF. create_gantt(df, colors='Blues', index_col='Complete',
653- show_colorbar=True, bar_width=0.5,
654- showgrid_x=True, showgrid_y=True)
652+ fig = create_gantt(df, colors='Blues', index_col='Complete',
653+ show_colorbar=True, bar_width=0.5,
654+ showgrid_x=True, showgrid_y=True)
655655
656656 # Plot the data
657657 py.iplot(fig, filename='Numerical Entries', world_readable=True)
@@ -660,7 +660,7 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
660660 Example 3: Index by Column with String Entries
661661 ```
662662 import plotly.plotly as py
663- from plotly.tools import FigureFactory as FF
663+ from plotly.figure_factory import create_gantt
664664
665665 # Make data for chart
666666 df = [dict(Task="Job A", Start='2009-01-01',
@@ -671,12 +671,9 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
671671 Finish='2009-05-30', Resource='Banana')]
672672
673673 # Create a figure with Plotly colorscale
674- fig = FF.create_gantt(df, colors=['rgb(200, 50, 25)',
675- (1, 0, 1),
676- '#6c4774'],
677- index_col='Resource',
678- reverse_colors=True,
679- show_colorbar=True)
674+ fig = create_gantt(df, colors=['rgb(200, 50, 25)', (1, 0, 1), '#6c4774'],
675+ index_col='Resource', reverse_colors=True,
676+ show_colorbar=True)
680677
681678 # Plot the data
682679 py.iplot(fig, filename='String Entries', world_readable=True)
@@ -685,7 +682,7 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
685682 Example 4: Use a dictionary for colors
686683 ```
687684 import plotly.plotly as py
688- from plotly.tools import FigureFactory as FF
685+ from plotly.figure_factory import create_gantt
689686
690687 # Make data for chart
691688 df = [dict(Task="Job A", Start='2009-01-01',
@@ -701,9 +698,8 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
701698 'Banana': (1, 1, 0.2)}
702699
703700 # Create a figure with Plotly colorscale
704- fig = FF.create_gantt(df, colors=colors,
705- index_col='Resource',
706- show_colorbar=True)
701+ fig = create_gantt(df, colors=colors, index_col='Resource',
702+ show_colorbar=True)
707703
708704 # Plot the data
709705 py.iplot(fig, filename='dictioanry colors', world_readable=True)
@@ -712,7 +708,7 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
712708 Example 5: Use a pandas dataframe
713709 ```
714710 import plotly.plotly as py
715- from plotly.tools import FigureFactory as FF
711+ from plotly.figure_factory import create_gantt
716712
717713 import pandas as pd
718714
@@ -723,9 +719,9 @@ def create_gantt(df, colors=None, index_col=None, show_colorbar=False,
723719 columns=['Task', 'Start', 'Finish', 'Complete'])
724720
725721 # Create a figure with Plotly colorscale
726- fig = FF. create_gantt(df, colors='Blues', index_col='Complete',
727- show_colorbar=True, bar_width=0.5,
728- showgrid_x=True, showgrid_y=True)
722+ fig = create_gantt(df, colors='Blues', index_col='Complete',
723+ show_colorbar=True, bar_width=0.5,
724+ showgrid_x=True, showgrid_y=True)
729725
730726 # Plot the data
731727 py.iplot(fig, filename='data with dataframe', world_readable=True)
0 commit comments