Skip to content

Commit 3ec2c0e

Browse files
committed
fix colors of -log10 chart
1 parent 2a6cfa0 commit 3ec2c0e

File tree

1 file changed

+4
-1
lines changed
  • EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/util

1 file changed

+4
-1
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view/util/ChartUtil.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ public static List<Color> getChartColors(ChartOptions options, boolean forStyle)
160160
if(forStyle) {
161161
// The 3-color schemes need to be swapped when the chart only includes positive numbers.
162162
// Swap UP and ZERO colors if q or p-value (it should not have negative values!)
163-
if ((data == ChartData.FDR_VALUE || data == ChartData.P_VALUE) && colors.size() == 3)
163+
if ((data == ChartData.FDR_VALUE || data == ChartData.P_VALUE) && colors.size() == 3) {
164164
colors = Arrays.asList(colors.get(0), colors.get(1));
165+
} else if(data == ChartData.LOG10_PVAL && colors.size() == 3) {
166+
colors = Arrays.asList(colors.get(1), colors.get(0));
167+
}
165168
}
166169

167170
return colors;

0 commit comments

Comments
 (0)