smooth peaks in gnuplot
I have datapoints f(x_i) at points x_i (function f not known, only numerically) with f(0) = 0. The data show a peaklike structure at small x, to be followed by a slow shoulder-falloff at larger x that sets in half-way down from the maximum. I want to plot smoothed lines through these data points.
If I use bezier then indeed f(0)=0 is ok, but the peak is significantly (by about 25%), lowered. If I use acsplines then the peak looks somewhat better, but f(0) = 0 is not maintained.
How can I smooth that dataset without loosing vital info (f(0)=0) or the peak-height of the distribution?
gnuplot smoothing
add a comment |
I have datapoints f(x_i) at points x_i (function f not known, only numerically) with f(0) = 0. The data show a peaklike structure at small x, to be followed by a slow shoulder-falloff at larger x that sets in half-way down from the maximum. I want to plot smoothed lines through these data points.
If I use bezier then indeed f(0)=0 is ok, but the peak is significantly (by about 25%), lowered. If I use acsplines then the peak looks somewhat better, but f(0) = 0 is not maintained.
How can I smooth that dataset without loosing vital info (f(0)=0) or the peak-height of the distribution?
gnuplot smoothing
stats.stackexchange.com
– Andrew Arnold
Jun 1 '15 at 18:34
1
Try cubic splines,smooth csplines
orsmooth mcsplines
– Christoph
Jun 1 '15 at 19:12
Thanks, indeed cplines or mcsplines maintain the peak much better than the others. However, there is a price: now the rest of the curve (shoulder at high x) looks wiggly if I choose weights such that the peak height is correct. Is there a way to do piecewise smoothing in gnuplot??
– Umo
Jun 2 '15 at 9:40
That's whatsmooth mcsplines
does, so that should work fine. BTW: bothcsplines
andmcsplines
don't use weights.
– Christoph
Jun 2 '15 at 11:07
Sorry, I was not clear enough: mcsplines indeed gives a good and smooth reproduction of the peak area, but in the tails wiggles show up. I would like to supress these wiggles.
– Umo
Jun 2 '15 at 18:42
add a comment |
I have datapoints f(x_i) at points x_i (function f not known, only numerically) with f(0) = 0. The data show a peaklike structure at small x, to be followed by a slow shoulder-falloff at larger x that sets in half-way down from the maximum. I want to plot smoothed lines through these data points.
If I use bezier then indeed f(0)=0 is ok, but the peak is significantly (by about 25%), lowered. If I use acsplines then the peak looks somewhat better, but f(0) = 0 is not maintained.
How can I smooth that dataset without loosing vital info (f(0)=0) or the peak-height of the distribution?
gnuplot smoothing
I have datapoints f(x_i) at points x_i (function f not known, only numerically) with f(0) = 0. The data show a peaklike structure at small x, to be followed by a slow shoulder-falloff at larger x that sets in half-way down from the maximum. I want to plot smoothed lines through these data points.
If I use bezier then indeed f(0)=0 is ok, but the peak is significantly (by about 25%), lowered. If I use acsplines then the peak looks somewhat better, but f(0) = 0 is not maintained.
How can I smooth that dataset without loosing vital info (f(0)=0) or the peak-height of the distribution?
gnuplot smoothing
gnuplot smoothing
asked Jun 1 '15 at 18:19
UmoUmo
2112
2112
stats.stackexchange.com
– Andrew Arnold
Jun 1 '15 at 18:34
1
Try cubic splines,smooth csplines
orsmooth mcsplines
– Christoph
Jun 1 '15 at 19:12
Thanks, indeed cplines or mcsplines maintain the peak much better than the others. However, there is a price: now the rest of the curve (shoulder at high x) looks wiggly if I choose weights such that the peak height is correct. Is there a way to do piecewise smoothing in gnuplot??
– Umo
Jun 2 '15 at 9:40
That's whatsmooth mcsplines
does, so that should work fine. BTW: bothcsplines
andmcsplines
don't use weights.
– Christoph
Jun 2 '15 at 11:07
Sorry, I was not clear enough: mcsplines indeed gives a good and smooth reproduction of the peak area, but in the tails wiggles show up. I would like to supress these wiggles.
– Umo
Jun 2 '15 at 18:42
add a comment |
stats.stackexchange.com
– Andrew Arnold
Jun 1 '15 at 18:34
1
Try cubic splines,smooth csplines
orsmooth mcsplines
– Christoph
Jun 1 '15 at 19:12
Thanks, indeed cplines or mcsplines maintain the peak much better than the others. However, there is a price: now the rest of the curve (shoulder at high x) looks wiggly if I choose weights such that the peak height is correct. Is there a way to do piecewise smoothing in gnuplot??
– Umo
Jun 2 '15 at 9:40
That's whatsmooth mcsplines
does, so that should work fine. BTW: bothcsplines
andmcsplines
don't use weights.
– Christoph
Jun 2 '15 at 11:07
Sorry, I was not clear enough: mcsplines indeed gives a good and smooth reproduction of the peak area, but in the tails wiggles show up. I would like to supress these wiggles.
– Umo
Jun 2 '15 at 18:42
stats.stackexchange.com
– Andrew Arnold
Jun 1 '15 at 18:34
stats.stackexchange.com
– Andrew Arnold
Jun 1 '15 at 18:34
1
1
Try cubic splines,
smooth csplines
or smooth mcsplines
– Christoph
Jun 1 '15 at 19:12
Try cubic splines,
smooth csplines
or smooth mcsplines
– Christoph
Jun 1 '15 at 19:12
Thanks, indeed cplines or mcsplines maintain the peak much better than the others. However, there is a price: now the rest of the curve (shoulder at high x) looks wiggly if I choose weights such that the peak height is correct. Is there a way to do piecewise smoothing in gnuplot??
– Umo
Jun 2 '15 at 9:40
Thanks, indeed cplines or mcsplines maintain the peak much better than the others. However, there is a price: now the rest of the curve (shoulder at high x) looks wiggly if I choose weights such that the peak height is correct. Is there a way to do piecewise smoothing in gnuplot??
– Umo
Jun 2 '15 at 9:40
That's what
smooth mcsplines
does, so that should work fine. BTW: both csplines
and mcsplines
don't use weights.– Christoph
Jun 2 '15 at 11:07
That's what
smooth mcsplines
does, so that should work fine. BTW: both csplines
and mcsplines
don't use weights.– Christoph
Jun 2 '15 at 11:07
Sorry, I was not clear enough: mcsplines indeed gives a good and smooth reproduction of the peak area, but in the tails wiggles show up. I would like to supress these wiggles.
– Umo
Jun 2 '15 at 18:42
Sorry, I was not clear enough: mcsplines indeed gives a good and smooth reproduction of the peak area, but in the tails wiggles show up. I would like to supress these wiggles.
– Umo
Jun 2 '15 at 18:42
add a comment |
1 Answer
1
active
oldest
votes
Smoothing with acsplines
draws an approximating cubic spline, which doesn't go through your original data points.
A better approach could be to use cubic splines smooth csplines
, which go through all data points but may show overshoots for sharp peaks.
The probably best solution in your case is to use monotonic cubic splines, smooth mcsplines
, which maintain the monotonicity and convexity of the original data points (see F.N. Fritsch and R.E. Carlson, "Monotone Piecewise Cubic Interpolation", SIAM Journal on Numerical Analysis 17, pp. 238-246 (1980)).
Here is a short example which shows these differences:
The test.dat
file contains the points
0 0
0.2 1
0.4 10
0.6 80
1 30
2 20
3 13
4 7
5 2
6 1
7 0
And the script to plot them is
set xzeroaxis
set style data lines
set samples 500
plot 'test.dat' u 1:2 smooth acsplines title 'acsplines',
'' u 1:2 smooth csplines title 'csplines',
'' u 1:2 smooth mcsplines lw 2 title 'mcsplines',
'' u 1:2 w p pt 7 title 'data points'
Thanks for these extended explanations. Now I understand why mcsplines is not ideal for me. The data points that I work with have some numerical noise so that the smoothed curve should NOT go through the points. acsplines does that quite well in the area to the right of the peak, if the weights are chosen right, but it also smoothes the peak away ( it lowers the maximum significantly). This is why I would like to apply different smoothing algorithms for different parts of the curve. In your little example give some scatter to the 6 rightmost points and then find a smooth curve through all.
– Umo
Jun 2 '15 at 18:58
For what do you need the smoothed curve? You could plot the data around the peak with mcsplines, and the tail with acsplines. Restrict the areas usingevery
then you could read the peaks fwhm, but you'll get a discontinuity where the two curves meet
– Christoph
Jun 2 '15 at 19:15
I need the smoothed curve for a publication. All I was looking for is a smoothed curve that removes the statistical noise from the data points and retains the peak (which has a clear physics justification) with approximately (within 5% let's say) the correct maximum value. A discontinuity is thus a not so desirable feature.
– Umo
Jun 3 '15 at 9:06
Well, those requirements are contradicting, I don't think that you can find a single suitable smoothing method without questionable hacks.My question aimed more at whether the line should be a guide to the eye, or if you want to estimate e.g. the peak width, or the fall down time etc. If you have some model for your data you could also do a fit.
– Christoph
Jun 3 '15 at 16:15
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f30580471%2fsmooth-peaks-in-gnuplot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Smoothing with acsplines
draws an approximating cubic spline, which doesn't go through your original data points.
A better approach could be to use cubic splines smooth csplines
, which go through all data points but may show overshoots for sharp peaks.
The probably best solution in your case is to use monotonic cubic splines, smooth mcsplines
, which maintain the monotonicity and convexity of the original data points (see F.N. Fritsch and R.E. Carlson, "Monotone Piecewise Cubic Interpolation", SIAM Journal on Numerical Analysis 17, pp. 238-246 (1980)).
Here is a short example which shows these differences:
The test.dat
file contains the points
0 0
0.2 1
0.4 10
0.6 80
1 30
2 20
3 13
4 7
5 2
6 1
7 0
And the script to plot them is
set xzeroaxis
set style data lines
set samples 500
plot 'test.dat' u 1:2 smooth acsplines title 'acsplines',
'' u 1:2 smooth csplines title 'csplines',
'' u 1:2 smooth mcsplines lw 2 title 'mcsplines',
'' u 1:2 w p pt 7 title 'data points'
Thanks for these extended explanations. Now I understand why mcsplines is not ideal for me. The data points that I work with have some numerical noise so that the smoothed curve should NOT go through the points. acsplines does that quite well in the area to the right of the peak, if the weights are chosen right, but it also smoothes the peak away ( it lowers the maximum significantly). This is why I would like to apply different smoothing algorithms for different parts of the curve. In your little example give some scatter to the 6 rightmost points and then find a smooth curve through all.
– Umo
Jun 2 '15 at 18:58
For what do you need the smoothed curve? You could plot the data around the peak with mcsplines, and the tail with acsplines. Restrict the areas usingevery
then you could read the peaks fwhm, but you'll get a discontinuity where the two curves meet
– Christoph
Jun 2 '15 at 19:15
I need the smoothed curve for a publication. All I was looking for is a smoothed curve that removes the statistical noise from the data points and retains the peak (which has a clear physics justification) with approximately (within 5% let's say) the correct maximum value. A discontinuity is thus a not so desirable feature.
– Umo
Jun 3 '15 at 9:06
Well, those requirements are contradicting, I don't think that you can find a single suitable smoothing method without questionable hacks.My question aimed more at whether the line should be a guide to the eye, or if you want to estimate e.g. the peak width, or the fall down time etc. If you have some model for your data you could also do a fit.
– Christoph
Jun 3 '15 at 16:15
add a comment |
Smoothing with acsplines
draws an approximating cubic spline, which doesn't go through your original data points.
A better approach could be to use cubic splines smooth csplines
, which go through all data points but may show overshoots for sharp peaks.
The probably best solution in your case is to use monotonic cubic splines, smooth mcsplines
, which maintain the monotonicity and convexity of the original data points (see F.N. Fritsch and R.E. Carlson, "Monotone Piecewise Cubic Interpolation", SIAM Journal on Numerical Analysis 17, pp. 238-246 (1980)).
Here is a short example which shows these differences:
The test.dat
file contains the points
0 0
0.2 1
0.4 10
0.6 80
1 30
2 20
3 13
4 7
5 2
6 1
7 0
And the script to plot them is
set xzeroaxis
set style data lines
set samples 500
plot 'test.dat' u 1:2 smooth acsplines title 'acsplines',
'' u 1:2 smooth csplines title 'csplines',
'' u 1:2 smooth mcsplines lw 2 title 'mcsplines',
'' u 1:2 w p pt 7 title 'data points'
Thanks for these extended explanations. Now I understand why mcsplines is not ideal for me. The data points that I work with have some numerical noise so that the smoothed curve should NOT go through the points. acsplines does that quite well in the area to the right of the peak, if the weights are chosen right, but it also smoothes the peak away ( it lowers the maximum significantly). This is why I would like to apply different smoothing algorithms for different parts of the curve. In your little example give some scatter to the 6 rightmost points and then find a smooth curve through all.
– Umo
Jun 2 '15 at 18:58
For what do you need the smoothed curve? You could plot the data around the peak with mcsplines, and the tail with acsplines. Restrict the areas usingevery
then you could read the peaks fwhm, but you'll get a discontinuity where the two curves meet
– Christoph
Jun 2 '15 at 19:15
I need the smoothed curve for a publication. All I was looking for is a smoothed curve that removes the statistical noise from the data points and retains the peak (which has a clear physics justification) with approximately (within 5% let's say) the correct maximum value. A discontinuity is thus a not so desirable feature.
– Umo
Jun 3 '15 at 9:06
Well, those requirements are contradicting, I don't think that you can find a single suitable smoothing method without questionable hacks.My question aimed more at whether the line should be a guide to the eye, or if you want to estimate e.g. the peak width, or the fall down time etc. If you have some model for your data you could also do a fit.
– Christoph
Jun 3 '15 at 16:15
add a comment |
Smoothing with acsplines
draws an approximating cubic spline, which doesn't go through your original data points.
A better approach could be to use cubic splines smooth csplines
, which go through all data points but may show overshoots for sharp peaks.
The probably best solution in your case is to use monotonic cubic splines, smooth mcsplines
, which maintain the monotonicity and convexity of the original data points (see F.N. Fritsch and R.E. Carlson, "Monotone Piecewise Cubic Interpolation", SIAM Journal on Numerical Analysis 17, pp. 238-246 (1980)).
Here is a short example which shows these differences:
The test.dat
file contains the points
0 0
0.2 1
0.4 10
0.6 80
1 30
2 20
3 13
4 7
5 2
6 1
7 0
And the script to plot them is
set xzeroaxis
set style data lines
set samples 500
plot 'test.dat' u 1:2 smooth acsplines title 'acsplines',
'' u 1:2 smooth csplines title 'csplines',
'' u 1:2 smooth mcsplines lw 2 title 'mcsplines',
'' u 1:2 w p pt 7 title 'data points'
Smoothing with acsplines
draws an approximating cubic spline, which doesn't go through your original data points.
A better approach could be to use cubic splines smooth csplines
, which go through all data points but may show overshoots for sharp peaks.
The probably best solution in your case is to use monotonic cubic splines, smooth mcsplines
, which maintain the monotonicity and convexity of the original data points (see F.N. Fritsch and R.E. Carlson, "Monotone Piecewise Cubic Interpolation", SIAM Journal on Numerical Analysis 17, pp. 238-246 (1980)).
Here is a short example which shows these differences:
The test.dat
file contains the points
0 0
0.2 1
0.4 10
0.6 80
1 30
2 20
3 13
4 7
5 2
6 1
7 0
And the script to plot them is
set xzeroaxis
set style data lines
set samples 500
plot 'test.dat' u 1:2 smooth acsplines title 'acsplines',
'' u 1:2 smooth csplines title 'csplines',
'' u 1:2 smooth mcsplines lw 2 title 'mcsplines',
'' u 1:2 w p pt 7 title 'data points'
answered Jun 2 '15 at 11:24
ChristophChristoph
38.9k847120
38.9k847120
Thanks for these extended explanations. Now I understand why mcsplines is not ideal for me. The data points that I work with have some numerical noise so that the smoothed curve should NOT go through the points. acsplines does that quite well in the area to the right of the peak, if the weights are chosen right, but it also smoothes the peak away ( it lowers the maximum significantly). This is why I would like to apply different smoothing algorithms for different parts of the curve. In your little example give some scatter to the 6 rightmost points and then find a smooth curve through all.
– Umo
Jun 2 '15 at 18:58
For what do you need the smoothed curve? You could plot the data around the peak with mcsplines, and the tail with acsplines. Restrict the areas usingevery
then you could read the peaks fwhm, but you'll get a discontinuity where the two curves meet
– Christoph
Jun 2 '15 at 19:15
I need the smoothed curve for a publication. All I was looking for is a smoothed curve that removes the statistical noise from the data points and retains the peak (which has a clear physics justification) with approximately (within 5% let's say) the correct maximum value. A discontinuity is thus a not so desirable feature.
– Umo
Jun 3 '15 at 9:06
Well, those requirements are contradicting, I don't think that you can find a single suitable smoothing method without questionable hacks.My question aimed more at whether the line should be a guide to the eye, or if you want to estimate e.g. the peak width, or the fall down time etc. If you have some model for your data you could also do a fit.
– Christoph
Jun 3 '15 at 16:15
add a comment |
Thanks for these extended explanations. Now I understand why mcsplines is not ideal for me. The data points that I work with have some numerical noise so that the smoothed curve should NOT go through the points. acsplines does that quite well in the area to the right of the peak, if the weights are chosen right, but it also smoothes the peak away ( it lowers the maximum significantly). This is why I would like to apply different smoothing algorithms for different parts of the curve. In your little example give some scatter to the 6 rightmost points and then find a smooth curve through all.
– Umo
Jun 2 '15 at 18:58
For what do you need the smoothed curve? You could plot the data around the peak with mcsplines, and the tail with acsplines. Restrict the areas usingevery
then you could read the peaks fwhm, but you'll get a discontinuity where the two curves meet
– Christoph
Jun 2 '15 at 19:15
I need the smoothed curve for a publication. All I was looking for is a smoothed curve that removes the statistical noise from the data points and retains the peak (which has a clear physics justification) with approximately (within 5% let's say) the correct maximum value. A discontinuity is thus a not so desirable feature.
– Umo
Jun 3 '15 at 9:06
Well, those requirements are contradicting, I don't think that you can find a single suitable smoothing method without questionable hacks.My question aimed more at whether the line should be a guide to the eye, or if you want to estimate e.g. the peak width, or the fall down time etc. If you have some model for your data you could also do a fit.
– Christoph
Jun 3 '15 at 16:15
Thanks for these extended explanations. Now I understand why mcsplines is not ideal for me. The data points that I work with have some numerical noise so that the smoothed curve should NOT go through the points. acsplines does that quite well in the area to the right of the peak, if the weights are chosen right, but it also smoothes the peak away ( it lowers the maximum significantly). This is why I would like to apply different smoothing algorithms for different parts of the curve. In your little example give some scatter to the 6 rightmost points and then find a smooth curve through all.
– Umo
Jun 2 '15 at 18:58
Thanks for these extended explanations. Now I understand why mcsplines is not ideal for me. The data points that I work with have some numerical noise so that the smoothed curve should NOT go through the points. acsplines does that quite well in the area to the right of the peak, if the weights are chosen right, but it also smoothes the peak away ( it lowers the maximum significantly). This is why I would like to apply different smoothing algorithms for different parts of the curve. In your little example give some scatter to the 6 rightmost points and then find a smooth curve through all.
– Umo
Jun 2 '15 at 18:58
For what do you need the smoothed curve? You could plot the data around the peak with mcsplines, and the tail with acsplines. Restrict the areas using
every
then you could read the peaks fwhm, but you'll get a discontinuity where the two curves meet– Christoph
Jun 2 '15 at 19:15
For what do you need the smoothed curve? You could plot the data around the peak with mcsplines, and the tail with acsplines. Restrict the areas using
every
then you could read the peaks fwhm, but you'll get a discontinuity where the two curves meet– Christoph
Jun 2 '15 at 19:15
I need the smoothed curve for a publication. All I was looking for is a smoothed curve that removes the statistical noise from the data points and retains the peak (which has a clear physics justification) with approximately (within 5% let's say) the correct maximum value. A discontinuity is thus a not so desirable feature.
– Umo
Jun 3 '15 at 9:06
I need the smoothed curve for a publication. All I was looking for is a smoothed curve that removes the statistical noise from the data points and retains the peak (which has a clear physics justification) with approximately (within 5% let's say) the correct maximum value. A discontinuity is thus a not so desirable feature.
– Umo
Jun 3 '15 at 9:06
Well, those requirements are contradicting, I don't think that you can find a single suitable smoothing method without questionable hacks.My question aimed more at whether the line should be a guide to the eye, or if you want to estimate e.g. the peak width, or the fall down time etc. If you have some model for your data you could also do a fit.
– Christoph
Jun 3 '15 at 16:15
Well, those requirements are contradicting, I don't think that you can find a single suitable smoothing method without questionable hacks.My question aimed more at whether the line should be a guide to the eye, or if you want to estimate e.g. the peak width, or the fall down time etc. If you have some model for your data you could also do a fit.
– Christoph
Jun 3 '15 at 16:15
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f30580471%2fsmooth-peaks-in-gnuplot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
stats.stackexchange.com
– Andrew Arnold
Jun 1 '15 at 18:34
1
Try cubic splines,
smooth csplines
orsmooth mcsplines
– Christoph
Jun 1 '15 at 19:12
Thanks, indeed cplines or mcsplines maintain the peak much better than the others. However, there is a price: now the rest of the curve (shoulder at high x) looks wiggly if I choose weights such that the peak height is correct. Is there a way to do piecewise smoothing in gnuplot??
– Umo
Jun 2 '15 at 9:40
That's what
smooth mcsplines
does, so that should work fine. BTW: bothcsplines
andmcsplines
don't use weights.– Christoph
Jun 2 '15 at 11:07
Sorry, I was not clear enough: mcsplines indeed gives a good and smooth reproduction of the peak area, but in the tails wiggles show up. I would like to supress these wiggles.
– Umo
Jun 2 '15 at 18:42