plotly / plotly/plotly_matlab

Color variation not working using swarmchart

Open
#181 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
MATLAB
Stars
413
Forks
166
PR merge metrics
No merged PRs in 30d

Description

The input argument c isn't changing marker's color when using swarmchart().

rng(1)
x1 = ones(1,100);
x2 = 2 * ones(1,100);
x3 = 3 * ones(1,100);
y1 = 2 * randn(1,100);
y2 = [randn(1,50) randn(1,50) + 4];
y3 = 5 * randn(1,100) + 5;

swarmchart(x1,y1,'red')
hold on
swarmchart(x2,y2,'green')
swarmchart(x3,y3,'blue')
hold off

fig2plotly();

The previous code should plot 3 different series with 3 different marker's color (red, green and blue), however, they're all being plotted with the default plotly colors.

Expected and generated (https://chart-studio.plotly.com/~xarico10/329/#/) plot:
Captura de Pantalla 2021-07-25 a la(s) 11 51 34 p  m

Captura de Pantalla 2021-07-25 a la(s) 11 51 46 p  m

Examples on using the c input argument on swarmchart() can be found on:
https://www.mathworks.com/help/matlab/ref/swarmchart.html#mw_41bfbeb8-a8e2-4fd1-a6d8-c4b05cd5d8d8

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the MATLAB example with three swarmchart() calls and fig2plotly(); then trace the fig2plotly() conversion entry point for swarmchart marker colors. Done means the exported Plotly figure preserves the red, green, and blue marker colors shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
matlab
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.