Added title font property to plots.
This commit is contained in:
@@ -35,8 +35,8 @@ import ch.psi.plot.MatrixPlot;
|
||||
import ch.psi.plot.MatrixPlotBase;
|
||||
import ch.psi.plot.MatrixPlotSeries;
|
||||
import ch.psi.plot.Plot;
|
||||
import ch.psi.plot.PlotSeries;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import java.awt.Font;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
@@ -61,6 +61,8 @@ public class Visualizer {
|
||||
|
||||
int subsampling;
|
||||
int subsamplingCounter=0;
|
||||
|
||||
public static final Font TITLE_FONT = new Font("Tahoma", Font.BOLD, 18);
|
||||
|
||||
private boolean first = true;
|
||||
public Visualizer(VDescriptor vdescriptor){
|
||||
@@ -82,6 +84,9 @@ public class Visualizer {
|
||||
// Create plot for visualization
|
||||
LinePlot plot = LinePlotBase.newPlot(linePlotImpl);
|
||||
plot.setTitle(lp.getTitle());
|
||||
plot.getAxis(Plot.AxisId.X).setLabel(null);
|
||||
plot.getAxis(Plot.AxisId.Y).setLabel(null);
|
||||
plot.setTitleFont(TITLE_FONT);
|
||||
|
||||
for(Series s: lp.getData()){
|
||||
if(s instanceof XYSeries){
|
||||
@@ -120,6 +125,7 @@ public class Visualizer {
|
||||
matrixPlotImpl="jzy3d";
|
||||
MatrixPlot plot = MatrixPlotBase.newPlot(matrixPlotImpl);
|
||||
plot.setTitle(lp.getTitle());
|
||||
plot.setTitleFont(TITLE_FONT);
|
||||
plot.addSeries(data);
|
||||
|
||||
for(Series s: lp.getData()){
|
||||
@@ -362,7 +368,7 @@ public class Visualizer {
|
||||
public List<JPanel> getPlotPanels(){
|
||||
List<JPanel> panels = new ArrayList<JPanel>();
|
||||
for(SeriesDataFilter f: filters){
|
||||
JPanel panel=f.getPlot().getChartPanel();
|
||||
JPanel panel=(JPanel) f.getPlot();
|
||||
if ((panel!=null) &&(!panels.contains(panel)))
|
||||
panels.add(panel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user