Skip to content

Fix the casing of the svg color MediumAquamarine in StatisticalPlots.pl.#1446

Open
drgrice1 wants to merge 1 commit into
openwebwork:PG-2.21from
drgrice1:statistical-plots-color-misname
Open

Fix the casing of the svg color MediumAquamarine in StatisticalPlots.pl.#1446
drgrice1 wants to merge 1 commit into
openwebwork:PG-2.21from
drgrice1:statistical-plots-color-misname

Conversation

@drgrice1

Copy link
Copy Markdown
Member

Although JSXGraph is lenient with this, LaTeX and TikZ are not. So if you use the greens color palette you end up getting the stroke color for this color in TikZ output. but an aqua marine color for JSXGraph output.

Here is a MWE for testing this:

DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'StatisticalPlots.pl', 'PGcourse.pl');

$barPlot = StatPlot(xmin => 0, xmax => 7, ymin => 0, ymax => 10);
$barPlot->add_barplot(
    [ 1 .. 6 ],
    [ 3, 6, 7, 8, 4, 1 ],
    fill_colors => { palette_name => 'greens' }
);

BEGIN_PGML
[<
    [<[@ $barPlot->image_type('Tikz'); @]* [!TikZ bar plot!]{$barPlot}{400}>]
    [<[@ $barPlot->image_type('JSXGraph'); @]* [!JSXGraph bar plot!]{$barPlot}{400}>]
>]{ [ class => 'd-flex gap-3 flex-wrap' ] }
END_PGML

ENDDOCUMENT();

I thought I had fixed all of these in my changes to #1374, but I seem to have missed this one.

It seems my editor's format on save also removed some spaces at the ends of lines in the POD that @pstaabp left in there.

…ts.pl`.

Although JSXGraph is lenient with this, LaTeX and TikZ are not. So if
you use the `greens` color palette you end up getting the stroke color
for this color in TikZ output. but an aqua marine color for JSXGraph
output.

Here is a MWE for testing this:

```
DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'StatisticalPlots.pl', 'PGcourse.pl');

$barPlot = StatPlot(xmin => 0, xmax => 7, ymin => 0, ymax => 10);
$barPlot->add_barplot(
    [ 1 .. 6 ],
    [ 3, 6, 7, 8, 4, 1 ],
    fill_colors => { palette_name => 'greens' }
);

BEGIN_PGML
[<
    [<[@ $barPlot->image_type('Tikz'); @]* [!TikZ bar plot!]{$barPlot}{400}>]
    [<[@ $barPlot->image_type('JSXGraph'); @]* [!JSXGraph bar plot!]{$barPlot}{400}>]
>]{ [ class => 'd-flex gap-3 flex-wrap' ] }
END_PGML

ENDDOCUMENT();
```

I thought I had fixed all of these in my changes to openwebwork#1374, but I seem to
have missed this one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants