Skip to content

Commit

Permalink
Remove x_axis from boxplot model representation
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Dec 14, 2020
1 parent e38be15 commit 2e7d869
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion ertviz/controllers/observation_response_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def _get_univariate_misfits_boxplots(misfits_df, color):
misfits_data = list()
for misfits in misfits_df.T:
plot = BoxPlotModel(
x_axis=[int(x_axis[misfits])],
y_axis=misfits_df.T[misfits].values,
name=f"Misfits@{int(x_axis.loc[misfits])}",
color=color,
Expand Down
3 changes: 0 additions & 3 deletions ertviz/models/plot_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@
class BoxPlotModel:
def __init__(self, **kwargs):
self.selected = True
self._x_axis = kwargs["x_axis"]
self._y_axis = kwargs["y_axis"]
self._name = kwargs["name"]
self._color = kwargs["color"]

@property
def repr(self):
repr_dict = dict(
# x=self._x_axis, this won't work :/
# need something else to get axis right if required
y=self._y_axis,
name=self.display_name,
boxpoints="all",
Expand Down
1 change: 0 additions & 1 deletion tests/plots/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def test_boxplot_representation():
data_df = pd.DataFrame(data=data, index=range(10))

plot = BoxPlotModel(
x_axis=[5],
y_axis=data_df.values,
name="Boxplot@Location5",
color=assets.ERTSTYLE["ensemble-selector"]["color_wheel"][0],
Expand Down

0 comments on commit 2e7d869

Please sign in to comment.