Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cannot apply both size and shape to points in a plot-by series (#…
…3402) -Fixed issue where multi_series_key would be removed too early and not applied to every argument -Verified by running the code below from issue #3402: ```python from deephaven import empty_table from deephaven.plot import Figure import math math_funcs = ["sin", "cos"] shapes = ["SQUARE", "CIRCLE", "UP_TRIANGLE", "DOWN_TRIANGLE", "RIGHT_TRIANGLE", "LEFT_TRIANGLE", "DIAMOND"] size = 50 # Unsupported shapes: ["ELLIPSE", "HORIZONTAL_RECTANGLE", "VERTICAL_RECTANGLE"] # Create a generic table that has enough columns to display all the shapes # Re-uses some of the funcs t = empty_table(size).update([f"name=`` + shapes[(int)Math.floor(i / Math.ceil(size / {len(shapes)}))]", "x=i*0.1"]) for i in range(len(shapes)): t = t.update([f"y{i}=Math.{math_funcs[i % len(math_funcs)]}(x+{math.floor(i / len(math_funcs))})"]) # Create a plot by figure p2 = Figure().plot_xy(series_name="Multi", t=t, by=["name"], x="x", y="y1").line(visible=True) for i in range(len(shapes)): # apply both shapes and sizes to points p2 = p2.point(shape=shapes[i], multi_series_key=[shapes[i]], size=len(shapes) - i, visible=True) p2 = p2.show()``` --------- Co-authored-by: Mike Bender <mikebender@deephaven.io>
- Loading branch information