Search in sources :

Example 1 with InterpolatingLookupPaintScale

use of net.sf.mzmine.util.interpolatinglookuppaintscale.InterpolatingLookupPaintScale in project mzmine2 by mzmine.

the class LogratioPlotModule method runModule.

@Override
@Nonnull
public ExitCode runModule(@Nonnull MZmineProject project, @Nonnull ParameterSet parameters, @Nonnull Collection<Task> tasks) {
    PeakList[] peakLists = parameters.getParameter(CVParameters.peakLists).getValue().getMatchingPeakLists();
    for (PeakList pl : peakLists) {
        // Create dataset & paint scale
        AbstractXYZDataset dataset = new LogratioDataset(pl, parameters);
        InterpolatingLookupPaintScale paintScale = new InterpolatingLookupPaintScale();
        paintScale.add(-1.00, new Color(0, 255, 0));
        paintScale.add(0.00, new Color(0, 0, 0));
        paintScale.add(1.00, new Color(255, 0, 0));
        // Create & show window
        RTMZAnalyzerWindow window = new RTMZAnalyzerWindow(dataset, pl, paintScale);
        window.setVisible(true);
    }
    return ExitCode.OK;
}
Also used : AbstractXYZDataset(org.jfree.data.xy.AbstractXYZDataset) RTMZAnalyzerWindow(net.sf.mzmine.modules.peaklistmethods.dataanalysis.rtmzplots.RTMZAnalyzerWindow) Color(java.awt.Color) InterpolatingLookupPaintScale(net.sf.mzmine.util.interpolatinglookuppaintscale.InterpolatingLookupPaintScale) PeakList(net.sf.mzmine.datamodel.PeakList) Nonnull(javax.annotation.Nonnull)

Example 2 with InterpolatingLookupPaintScale

use of net.sf.mzmine.util.interpolatinglookuppaintscale.InterpolatingLookupPaintScale in project mzmine2 by mzmine.

the class CVPlotModule method runModule.

@Override
@Nonnull
public ExitCode runModule(@Nonnull MZmineProject project, @Nonnull ParameterSet parameters, @Nonnull Collection<Task> tasks) {
    PeakList[] peakLists = parameters.getParameter(CVParameters.peakLists).getValue().getMatchingPeakLists();
    for (PeakList pl : peakLists) {
        // Create dataset & paint scale
        AbstractXYZDataset dataset = new CVDataset(pl, parameters);
        InterpolatingLookupPaintScale paintScale = new InterpolatingLookupPaintScale();
        paintScale.add(0.00, new Color(0, 0, 0));
        paintScale.add(0.15, new Color(102, 255, 102));
        paintScale.add(0.30, new Color(51, 102, 255));
        paintScale.add(0.45, new Color(255, 0, 0));
        // Create & show window
        RTMZAnalyzerWindow window = new RTMZAnalyzerWindow(dataset, pl, paintScale);
        window.setVisible(true);
    }
    return ExitCode.OK;
}
Also used : AbstractXYZDataset(org.jfree.data.xy.AbstractXYZDataset) RTMZAnalyzerWindow(net.sf.mzmine.modules.peaklistmethods.dataanalysis.rtmzplots.RTMZAnalyzerWindow) Color(java.awt.Color) InterpolatingLookupPaintScale(net.sf.mzmine.util.interpolatinglookuppaintscale.InterpolatingLookupPaintScale) PeakList(net.sf.mzmine.datamodel.PeakList) Nonnull(javax.annotation.Nonnull)

Aggregations

Color (java.awt.Color)2 Nonnull (javax.annotation.Nonnull)2 PeakList (net.sf.mzmine.datamodel.PeakList)2 RTMZAnalyzerWindow (net.sf.mzmine.modules.peaklistmethods.dataanalysis.rtmzplots.RTMZAnalyzerWindow)2 InterpolatingLookupPaintScale (net.sf.mzmine.util.interpolatinglookuppaintscale.InterpolatingLookupPaintScale)2 AbstractXYZDataset (org.jfree.data.xy.AbstractXYZDataset)2