Home » Community » Newbie corner » How do I make this graph?
Re: How do I make this graph? [message #39882 is a reply to message #39823] |
Thu, 09 May 2013 08:19 |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |
|
|
Thanks for all the help. I have been able to make a workable solution with the scatterctrl.
The blue line is what I wish to draw. It interpolates between data points that are presented to scatterctrl. However, the un-initialized vector data shows up at 0,0 This is not desirable because when I turn on .plot(), lines appear connecting 0,0 to each of the points in the series. It looks like cones falling from 0,0(orange lines)
I am setting the vector like this
Vector<Pointf> LeftSeries[4];
Since I have just 12 points on X axis, I enter the data like this
Test.scaLeft.SetRange(12, 130).SetXYMin(0, -120);
Test.scaLeft.SetMajorUnits(1, 10).ShowLegend(true);
Test.scaLeft.SetLabelX("Frequency (Hz)").SetLabelY("dB");
Test.scaLeft.cbModifFormatX = THISBACK(A2001_13::FormatX);
Test.scaLeft.cbModifFormatY = THISBACK(A2001_13::FormatY);
Test.scaLeft.AddSeries(LeftSeries[0]).Legend("ACL").NoPlot()
.AddSeries(LeftSeries[1]).Legend("ACLM")
.AddSeries(LeftSeries[2]).Legend("BCL")
.AddSeries(LeftSeries[3]).Legend("BCLM");
and to plot the points
double f = -1;
Test.stText = AsString(Test.spnFrequency.GetIndex());
LeftSeries[0].Set(Test.spnFrequency.GetIndex(), Pointf(Test.spnFrequency.GetIndex(),f*Test.spnIntensity));
Test.scaLeft.Refresh();
Test is a <TopWindow>, others are EditIntSpin while spnFrequency is a droplist
The user can enter any point (not necessarily in a sequence of X) and the graph would interpolate it.
Question is, can this be done?
Best regards
Jerson
|
|
|
|
|
How do I make this graph?
By: jerson on Sat, 04 May 2013 09:51
|
|
|
Re: How do I make this graph?
By: Didier on Sat, 04 May 2013 15:22
|
|
|
Re: How do I make this graph?
By: Didier on Sat, 04 May 2013 15:26
|
|
|
Re: How do I make this graph?
By: jerson on Sat, 04 May 2013 16:53
|
|
|
Re: How do I make this graph?
By: koldo on Sun, 05 May 2013 15:57
|
|
|
Re: How do I make this graph?
By: jerson on Sun, 05 May 2013 17:07
|
|
|
Re: How do I make this graph?
By: jerson on Sun, 05 May 2013 18:42
|
|
|
Re: How do I make this graph?
By: koldo on Sun, 05 May 2013 19:02
|
|
|
Re: How do I make this graph?
By: jerson on Mon, 06 May 2013 09:32
|
|
|
Re: How do I make this graph?
By: koldo on Mon, 06 May 2013 10:11
|
|
|
Re: How do I make this graph?
By: jerson on Mon, 06 May 2013 11:40
|
|
|
Re: How do I make this graph?
By: koldo on Mon, 06 May 2013 12:07
|
|
|
Re: How do I make this graph?
By: jerson on Thu, 09 May 2013 08:19
|
|
|
Re: How do I make this graph?
By: koldo on Thu, 09 May 2013 11:04
|
|
|
Re: How do I make this graph?
By: jerson on Thu, 09 May 2013 12:15
|
|
|
Re: How do I make this graph?
By: jerson on Thu, 09 May 2013 14:07
|
|
|
Re: How do I make this graph?
By: koldo on Thu, 09 May 2013 14:36
|
|
|
Re: How do I make this graph?
By: jerson on Thu, 09 May 2013 15:46
|
|
|
Re: How do I make this graph?
By: koldo on Thu, 09 May 2013 16:03
|
|
|
Re: How do I make this graph?
By: jerson on Fri, 10 May 2013 06:48
|
|
|
Re: How do I make this graph?
By: koldo on Fri, 10 May 2013 08:01
|
Goto Forum:
Current Time: Wed Jun 05 12:13:40 CEST 2024
Total time taken to generate the page: 0.02374 seconds
|