diff --git a/mathics/builtin/atomic/symbols.py b/mathics/builtin/atomic/symbols.py index 03a4ba158..401ae4fc0 100644 --- a/mathics/builtin/atomic/symbols.py +++ b/mathics/builtin/atomic/symbols.py @@ -576,7 +576,7 @@ class Names(Builtin): The wildcard '*' matches any character: >> Names["List*"] - = {List, ListLinePlot, ListLogPlot, ListPlot, ListQ, Listable} + = {List, ListLinePlot, ListLogPlot, ListPlot, ListQ, ListStepPlot, Listable} The wildcard '@' matches only lowercase characters: >> Names["List@"] diff --git a/mathics/builtin/drawing/plot.py b/mathics/builtin/drawing/plot.py index 7635ab32e..c5c1bc622 100644 --- a/mathics/builtin/drawing/plot.py +++ b/mathics/builtin/drawing/plot.py @@ -1693,7 +1693,7 @@ def apply_fn(fn: Callable, x_value: int) -> Optional[float]: is_joined_plot=False, filling=False, use_log_scale=False, - plot_type=ListPlot.DiscretePlot, + list_plot_type=ListPlotType.DiscretePlot, options=options, ) diff --git a/mathics/eval/drawing/plot.py b/mathics/eval/drawing/plot.py index 789d78218..f2d7a676e 100644 --- a/mathics/eval/drawing/plot.py +++ b/mathics/eval/drawing/plot.py @@ -142,14 +142,17 @@ def eval_ListPlot( options: dict, ): """ - Evaluation part of LisPlot[] and DiscretePlot[] - - plot_groups: the plot point data, It can be in a number of different list formats - x_range: the x range that of the area to show in the plot - y_range: the y range that of the area to show in the plot - is_discrete_plot: True if called from DiscretePlot, False if called from ListPlot - is_joined_plot: True if points are to be joined. This never happens in a discrete plot - options: miscellaneous graphics options from underlying M-Expression + Evaluation part of ListPlot like plots. eg DiscretePlot[], ListPlot[], ListLinePlot[], etc. + which are enumerated in ListPlotType. + + Parameters; + plot_groups: the plot point data, It can be in a number of different list formats + x_range: the x range that of the area to show in the plot + y_range: the y range that of the area to show in the plot + is_discrete_plot: True if called from DiscretePlot, False if called from ListPlot + is_joined_plot: True if points are to be joined. This never happens in a discrete plot + list_plot_type: the kinds of ListPlots we handle + options: miscellaneous graphics options from underlying M-Expression """ if not isinstance(plot_groups, list) or len(plot_groups) == 0: @@ -247,9 +250,9 @@ def eval_ListPlot( break pass - # For step plots we have 2n - 1 points, which - # we create from the n points here - # We insert a new point from the y coodinate + # For step plots, we have 2n - 1 points These + # we create from the n points here. + # We insert a new point from the y coordinate # of the previous point in between each new point # other than the first point if list_plot_type == ListPlotType.ListStepPlot: