Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
autodoc_pydantic_model_show_config_summary = False
autodoc_pydantic_model_show_field_summary = True

# Autosectionlabel settings
autosectionlabel_prefix_document = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
4 changes: 2 additions & 2 deletions src/statsplotly/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@
DEFAULT_MARKER_SIZE = 6
MIN_MARKER_SIZE = 4
MAX_MARKER_SIZE = 24
DEFAULT_MARKER_LINE_COLOR = "grey"
DEFAULT_MARKER_LINE_WIDTH = 2
DEFAULT_SCATTER3D_MARKER_LINE_COLOR = "white"
DEFAULT_SCATTER3D_MARKER_LINE_WIDTH = 1
DEFAULT_TRANSPARENCE_OPACITY = 0.8
DEFAULT_REGRESSION_LINE_OPACITY = 1
DEFAULT_REGRESSION_LINE_DASH = "dash"
Expand Down
7 changes: 3 additions & 4 deletions src/statsplotly/plot_objects/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class _ScatterBaseTrace(BaseTrace):
error_y: dict[str, Any] | None = None
text: str | pd.Series | None = None
textposition: str | None = None
hoverinfo: str = "x+y+name+text"

@classmethod
def build_trace(
Expand Down Expand Up @@ -225,7 +224,7 @@ class ShadedTrace(_ScatterBaseTrace, _PlotlyTraceMixin):
_PLOTLY_GRAPH_FCT = go.Scatter

hoverinfo: str = "x+y+name+text"
line: dict[str, Any]
line: dict[str, Any] | None = None
fill: str
fillcolor: str | None

Expand Down Expand Up @@ -398,8 +397,8 @@ def build_trace(
"error_z": error_z_data,
"marker": {
"line": {
"color": constants.DEFAULT_MARKER_LINE_COLOR,
"width": constants.DEFAULT_MARKER_LINE_WIDTH,
"color": constants.DEFAULT_SCATTER3D_MARKER_LINE_COLOR,
"width": constants.DEFAULT_SCATTER3D_MARKER_LINE_WIDTH,
}
},
},
Expand Down
18 changes: 11 additions & 7 deletions src/statsplotly/plot_specifiers/data/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,17 @@ def _build_trace_data_from_pointer(
data[pointer.color] if pointer.color in data.columns else pointer.color
)
trace_data["size_data"] = (
pd.Series(
range_normalize(
data[pointer.size].to_numpy(),
constants.MIN_MARKER_SIZE,
constants.MAX_MARKER_SIZE,
),
name=pointer.size,
(
pd.Series(
range_normalize(
data[pointer.size].to_numpy(),
constants.MIN_MARKER_SIZE,
constants.MAX_MARKER_SIZE,
),
name=pointer.size,
)
if data[pointer.size].max() > constants.MAX_MARKER_SIZE
else data[pointer.size]
)
if pointer.size in data.columns
else pointer.size
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plot_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_scatter3d_trace(example_3dtrace_data):
"opacity": None,
"symbol": None,
"coloraxis": None,
"line": {"color": "grey", "width": 2},
"line": {"color": "white", "width": 1},
}


Expand Down
Loading