Skip to content

Commit

Permalink
update plotly peakmap plots
Browse files Browse the repository at this point in the history
  • Loading branch information
jcharkow committed Dec 17, 2024
1 parent 2ebd277 commit d7cd740
Show file tree
Hide file tree
Showing 6 changed files with 47,447 additions and 900 deletions.
10 changes: 7 additions & 3 deletions pyopenms_viz/_plotly/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ def plot(self):
color=self.data[self.z],
colorscale="Inferno_r",
showscale=False,
size=self.marker_size,
size=self.marker_size
/ 3, # divide by 3 so approximately same unit as other backends
opacity=self.opacity,
cmin=self.data[self.z].min(),
cmax=self.data[self.z].max(),
Expand Down Expand Up @@ -509,13 +510,16 @@ def plot(self):
else:
for group, df in self.data.groupby(self.by):
if self.z is not None:
marker_dict["color"] = self.data[self.z]
marker_dict["color"] = (
df[self.z] if self.z is not None else self.current_color
)
marker_dict["symbol"] = self.current_marker
trace = go.Scatter(
x=df[self.x],
y=df[self.y],
mode="markers",
name=group,
marker=dict(symbol=self.current_marker, color=self.current_color),
marker=marker_dict,
)
traces.append(trace)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "square"
},
"mode": "markers",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "square"
},
"mode": "markers",
Expand Down Expand Up @@ -352,9 +352,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "circle"
},
"mode": "markers",
Expand Down Expand Up @@ -632,9 +632,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "diamond"
},
"mode": "markers",
Expand Down Expand Up @@ -912,9 +912,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "cross"
},
"mode": "markers",
Expand Down Expand Up @@ -1192,9 +1192,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "x"
},
"mode": "markers",
Expand Down Expand Up @@ -1472,9 +1472,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "triangle-up"
},
"mode": "markers",
Expand Down Expand Up @@ -1752,9 +1752,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "triangle-down"
},
"mode": "markers",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "square"
},
"mode": "markers",
Expand Down Expand Up @@ -312,9 +312,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "circle"
},
"mode": "markers",
Expand Down Expand Up @@ -556,9 +556,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "diamond"
},
"mode": "markers",
Expand Down Expand Up @@ -800,9 +800,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "cross"
},
"mode": "markers",
Expand Down Expand Up @@ -1044,9 +1044,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "x"
},
"mode": "markers",
Expand Down Expand Up @@ -1288,9 +1288,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "triangle-up"
},
"mode": "markers",
Expand Down Expand Up @@ -1532,9 +1532,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "triangle-down"
},
"mode": "markers",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "square"
},
"mode": "markers",
Expand Down Expand Up @@ -352,9 +352,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "circle"
},
"mode": "markers",
Expand Down Expand Up @@ -632,9 +632,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "diamond"
},
"mode": "markers",
Expand Down Expand Up @@ -912,9 +912,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "cross"
},
"mode": "markers",
Expand Down Expand Up @@ -1192,9 +1192,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "x"
},
"mode": "markers",
Expand Down Expand Up @@ -1472,9 +1472,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "triangle-up"
},
"mode": "markers",
Expand Down Expand Up @@ -1752,9 +1752,9 @@
"#000004"
]
],
"opacity": 0.8,
"opacity": 1.0,
"showscale": false,
"size": 10,
"size": 10.0,
"symbol": "triangle-down"
},
"mode": "markers",
Expand Down
Loading

0 comments on commit d7cd740

Please sign in to comment.