Repository navigation
Disable RDP smoothing for JSXGraph function graphs. - #1569
Merged
Merged
Conversation
Member
Member
Author
Member
Author
|
That happens with the main branch as well by the way. |
pstaabp
approved these changes
Nov 3, 2026
pstaabp
left a comment
Member
There was a problem hiding this comment.
I'm still not seeing it on develop, but am on main and this is pretty straightforward.
drgrice1
force-pushed
the
plots-fill-issue
branch
from
November 4, 2026 12:18
6a66c8b to
627441f
Compare
JSXGraph 1.13.0 enables RDPsmoothing by default for functiongraph
elements. That thins out the curve points, and since the fill code
filters those points to the fill_min/fill_max range, the fill no longer
starts at fill_min (or ends at fill_max), leaving a visible gap.
The following MWE can be used to test this.
```
DOCUMENT();
loadMacros('PGstandard.pl', 'PGML.pl', 'plots.pl', 'PGcourse.pl');
$graph = Plot(xmin => -4, xmax => 4, ymin => 0, ymax => 0.42);
$graph->add_dataset([ [ -1, 0 ], [ -1, exp(-1 / 2) / sqrt(2 * pi) ] ]);
$graph->add_function([
'exp(-x^2 / 2) / sqrt(2 * pi)', 'x', -4, 4,
name => 'f',
fill => 'xaxis',
fill_min => -1,
fill_max => 4,
#jsx_options => { RDPsmoothing => 0 }
]);
BEGIN_PGML
[!graph!]{$graph}
END_PGML
ENDDOCUMENT();
```
With the develop branch (or the main branch) there is a visible gap on
the left side of the fill region. If the commented out line in that
code is uncommented, the gap goes away with the develop branch. With
this branch the macro adds that option, so the gap also is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
drgrice1
force-pushed
the
plots-fill-issue
branch
from
November 10, 2026 22:43
627441f to
fd88b6e
Compare
somiaj
approved these changes
Nov 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


JSXGraph 1.13.0 enables RDPsmoothing by default for functiongraph elements. That thins out the curve points, and since the fill code filters those points to the fill_min/fill_max range, the fill no longer starts at fill_min (or ends at fill_max), leaving a visible gap.
The following MWE can be used to test this.
With the develop branch (or the main branch) there is a visible gap on the left side of the fill region. If the commented out line in that code is uncommented, the gap goes away with the develop branch. With this branch the macro adds that option, so the gap also is gone.