Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jinimukh committed Apr 23, 2021
1 parent 9396603 commit 7820f1e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lux/action/enhance.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,15 @@ def enhance(ldf):
"description": f"Further breaking down current {intended_attrs} intent by additional attribute.",
"long_description": f"Enhance adds an additional attribute as the color to break down the {intended_attrs} distribution",
}
if (
filter(lambda x: ldf.data_type[x] == "ordinal", attr_str)
and lux.config.plotting_backend == "matplotlib"
):
recommendation[
"long_description"
] += f"The Box Plot Visualizations in the 'Enhance' tab are rendered using <a href='https://altair-viz.github.io/'>Altair</a>. Lux does not currently support box plots with Matplotlib. If you would like this feature, please leave us a comment at <a href='https://github.com/lux-org/lux/issues/240'>issue #240</a> to let us know!"
# if there are too many column attributes, return don't generate Enhance recommendations
else:
if len(attr_specs) > 2:
recommendation = {"action": "Enhance"}
recommendation["collection"] = []
return recommendation
Expand Down
1 change: 1 addition & 0 deletions lux/action/univariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def univariate(ldf, *args):
if len(ldf) < 5:
ignore_rec_flag = True
elif data_type_constraint == "nominal":
# possible attributes are only nominal/ordinal data types for categorical data
possible_attributes = [
c
for c in ldf.columns
Expand Down
1 change: 1 addition & 0 deletions lux/vislib/altair/BoxPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def __repr__(self):
return f"BoxPlot <{str(self.vis)}>"

def initialize_chart(self):

x_attr = self.vis.get_attr_by_channel("x")[0]
y_attr = self.vis.get_attr_by_channel("y")[0]

Expand Down

0 comments on commit 7820f1e

Please sign in to comment.