Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions chaco/plot_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _create_data_sources(data, index_sort="none"):


def create_scatter_plot(
data=[],
data=None,
index_bounds=None,
value_bounds=None,
orientation="h",
Expand All @@ -69,6 +69,8 @@ def create_scatter_plot(

Pre-existing "index" and "value" datasources can be passed in.
"""
if data is None:
data = []

index, value = _create_data_sources(data)

Expand Down Expand Up @@ -109,7 +111,7 @@ def create_scatter_plot(


def create_line_plot(
data=[],
data=None,
index_bounds=None,
value_bounds=None,
orientation="h",
Expand All @@ -130,6 +132,9 @@ def create_line_plot(

Pre-existing "index" and "value" datasources can be passed in.
"""
if data is None:
data = []

index, value = _create_data_sources(data, index_sort)

if index_bounds is not None:
Expand Down Expand Up @@ -168,7 +173,7 @@ def create_line_plot(


def create_bar_plot(
data=[],
data=None,
index_bounds=None,
value_bounds=None,
orientation="h",
Expand All @@ -191,6 +196,9 @@ def create_bar_plot(

Pre-existing "index" and "value" datasources can be passed in.
"""
if data is None:
data = []

index, value = _create_data_sources(data)

if index_bounds is not None:
Expand Down