03-24-2020 07:57 AM
Hello,
I've a scatter graph with a plot and two templates plots.
I would like to get a color outside those plots like the pink color on the picture.
How to do the trick ?
Thanks.
Flow
Solved! Go to Solution.
05-28-2020 09:37 AM
Hi Flow,
I am assuming you would like this in LabVIEW if so, see below:
You could use the Fill Base Line option by right-clicking the Plot legend and select the option 'infinity'.
Thanks,
Shezan Nabiel
05-28-2020 09:43 AM
Hi Flow,
I am assuming you would like this in LabVIEW if so, see below:
You could use the Fill Base Line option by right-clicking the Plot legend and select the option 'infinity'.
You can also do this programmatically by adding a property node by right clicking the graph and following this:
You will need to add a constant value to the property node, see the context help for more info:
I have added an example for LabVIEW 2018, let me know if you need it for another version.
Thanks,
Shezan Nabiel
05-28-2020 09:55 AM
Hello,
Thank you for your answers.
Unfortunatly I use the MeasurementStudio library in C#. using the scattergraph object.
I didn't use Labview software.
Flo.
05-28-2020 10:01 AM
Hi Flow,
If you send me a basic example of your code, I could try edit & develop an example for you in C#.
Thank you
Shezan Nabiel
05-29-2020 02:08 AM
ahhhh just find out my solution.
Thank you very much for your help.
For information, the solution :
this.scatterGraph1 = new NationalInstruments.UI.WindowsForms.ScatterGraph();
this.xAxis1 = new NationalInstruments.UI.XAxis();
this.yAxis1 = new NationalInstruments.UI.YAxis();
this.scatterPlot1 = new NationalInstruments.UI.ScatterPlot();
this.scatterPlot2 = new NationalInstruments.UI.ScatterPlot();
((System.ComponentModel.ISupportInitialize)(this.scatterGraph1)).BeginInit();
this.SuspendLayout();
//
// scatterGraph1
//
this.scatterGraph1.Dock = System.Windows.Forms.DockStyle.Fill;
this.scatterGraph1.Location = new System.Drawing.Point(0, 0);
this.scatterGraph1.Name = "scatterGraph1";
this.scatterGraph1.Plots.AddRange(new NationalInstruments.UI.ScatterPlot[] {
this.scatterPlot1,
this.scatterPlot2});
this.scatterGraph1.Size = new System.Drawing.Size(428, 391);
this.scatterGraph1.TabIndex = 0;
this.scatterGraph1.UseColorGenerator = true;
this.scatterGraph1.XAxes.AddRange(new NationalInstruments.UI.XAxis[] {
this.xAxis1});
this.scatterGraph1.YAxes.AddRange(new NationalInstruments.UI.YAxis[] {
this.yAxis1});
//
// scatterPlot1
//
this.scatterPlot1.BasePlot = this.scatterPlot2;
this.scatterPlot1.FillBase = NationalInstruments.UI.XYPlotFillBase.Plot;
this.scatterPlot1.FillMode = NationalInstruments.UI.PlotFillMode.Fill;
this.scatterPlot1.XAxis = this.xAxis1;
this.scatterPlot1.YAxis = this.yAxis1;
//
// scatterPlot2
//
this.scatterPlot2.BasePlot = this.scatterPlot1;
this.scatterPlot2.FillBase = NationalInstruments.UI.XYPlotFillBase.Plot;
this.scatterPlot2.XAxis = this.xAxis1;
this.scatterPlot2.YAxis = this.yAxis1;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(428, 391);
this.Controls.Add(this.scatterGraph1);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.scatterGraph1)).EndInit();
this.ResumeLayout(false);