comparison Plot.c @ 218:a3494d2806ee

Change plot lines color to red
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Fri, 02 May 2014 16:32:50 +0200
parents be87c8e78266
children
comparison
equal deleted inserted replaced
217:fefe921a9784 218:a3494d2806ee
2 #include <userint.h> 2 #include <userint.h>
3 3
4 #include "utils.h" 4 #include "utils.h"
5 #include "FXPlot.h" 5 #include "FXPlot.h"
6 #include "Plot.h" 6 #include "Plot.h"
7
8 #define PLOT_LINE_COLOR VAL_RED
7 9
8 void Plot_InitPanel(Plot_Data *Instance, const char *title, double ymin, double ymax, int parent, int control) 10 void Plot_InitPanel(Plot_Data *Instance, const char *title, double ymin, double ymax, int parent, int control)
9 { 11 {
10 if ((Instance->PlotPanel = LoadPanel (0, "FXPlot.uir", PLOTPANEL)) < 0) 12 if ((Instance->PlotPanel = LoadPanel (0, "FXPlot.uir", PLOTPANEL)) < 0)
11 return; 13 return;
89 SetCtrlVal(Instance->PlotPanel,PLOTPANEL_ADEV, 0.0); 91 SetCtrlVal(Instance->PlotPanel,PLOTPANEL_ADEV, 0.0);
90 } 92 }
91 93
92 DeleteGraphPlot(Instance->PlotPanel, PLOTPANEL_FREQPLOT, -1, VAL_IMMEDIATE_DRAW); 94 DeleteGraphPlot(Instance->PlotPanel, PLOTPANEL_FREQPLOT, -1, VAL_IMMEDIATE_DRAW);
93 PlotY(Instance->PlotPanel, PLOTPANEL_FREQPLOT, Instance->Frequencies, Instance->IndexPoint, 95 PlotY(Instance->PlotPanel, PLOTPANEL_FREQPLOT, Instance->Frequencies, Instance->IndexPoint,
94 VAL_DOUBLE, VAL_THIN_LINE, VAL_EMPTY_SQUARE, VAL_SOLID, 1, VAL_BLUE); 96 VAL_DOUBLE, VAL_THIN_LINE, VAL_EMPTY_SQUARE, VAL_SOLID, 1, PLOT_LINE_COLOR);
95 97
96 int autoscale; 98 int autoscale;
97 GetCtrlVal(Instance->PlotPanel, PLOTPANEL_CHECKBOX_AUTOSCALE, &autoscale); 99 GetCtrlVal(Instance->PlotPanel, PLOTPANEL_CHECKBOX_AUTOSCALE, &autoscale);
98 if (autoscale) { 100 if (autoscale) {
99 /* update plot limits */ 101 /* update plot limits */