-
-
Notifications
You must be signed in to change notification settings - Fork 79
StatisticalPlots macro #1374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: PG-2.21
Are you sure you want to change the base?
StatisticalPlots macro #1374
Changes from all commits
7e786fd
85ebaeb
063c60d
b664874
6b6d9d4
aa36cee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -350,6 +350,7 @@ sub axis_defaults { | |
| tick_labels => 1, | ||
| tick_label_format => 'decimal', | ||
| tick_label_digits => 2, | ||
| tick_label_custom => undef, # NEW: Array of custom labels | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove this. It should not be here anymore. |
||
| tick_distance => 0, | ||
| tick_scale => 1, | ||
| tick_scale_symbol => '', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,21 +128,29 @@ sub HTML { | |
| $options->{mathJaxTickLabels} = $axes->style('mathjax_tick_labels') if $xvisible || $yvisible; | ||
|
|
||
| if ($xvisible) { | ||
| $options->{xAxis}{name} = $axes->xaxis('label'); | ||
| $options->{xAxis}{ticks}{show} = $axes->xaxis('show_ticks'); | ||
| $options->{xAxis}{ticks}{labels} = $axes->xaxis('tick_labels'); | ||
| $options->{xAxis}{ticks}{labelFormat} = $axes->xaxis('tick_label_format'); | ||
| $options->{xAxis}{ticks}{labelDigits} = $axes->xaxis('tick_label_digits'); | ||
| $options->{xAxis}{name} = $axes->xaxis('label'); | ||
| $options->{xAxis}{ticks}{show} = $axes->xaxis('show_ticks'); | ||
| $options->{xAxis}{ticks}{labels} = $axes->xaxis('tick_labels'); | ||
| if ($axes->xaxis('tick_label_custom')) { | ||
| $options->{xAxis}{ticks}{customLabels} = $axes->xaxis('tick_label_custom'); | ||
| } else { | ||
| $options->{xAxis}{ticks}{labelFormat} = $axes->xaxis('tick_label_format'); | ||
| $options->{xAxis}{ticks}{labelDigits} = $axes->xaxis('tick_label_digits'); | ||
| } | ||
|
Comment on lines
+131
to
+139
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert all changes to this file. This pull request should not have any changes to this file anymore. |
||
| $options->{xAxis}{ticks}{scaleSymbol} = $axes->xaxis('tick_scale_symbol'); | ||
| $options->{xAxis}{arrowsBoth} = $axes->xaxis('arrows_both'); | ||
| $options->{xAxis}{overrideOptions} = $axes->xaxis('jsx_options') if $axes->xaxis('jsx_options'); | ||
| } | ||
| if ($yvisible) { | ||
| $options->{yAxis}{name} = $axes->yaxis('label'); | ||
| $options->{yAxis}{ticks}{show} = $axes->yaxis('show_ticks'); | ||
| $options->{yAxis}{ticks}{labels} = $axes->yaxis('tick_labels'); | ||
| $options->{yAxis}{ticks}{labelFormat} = $axes->yaxis('tick_label_format'); | ||
| $options->{yAxis}{ticks}{labelDigits} = $axes->yaxis('tick_label_digits'); | ||
| $options->{yAxis}{name} = $axes->yaxis('label'); | ||
| $options->{yAxis}{ticks}{show} = $axes->yaxis('show_ticks'); | ||
| $options->{yAxis}{ticks}{labels} = $axes->yaxis('tick_labels'); | ||
| if ($axes->yaxis('tick_label_custom')) { | ||
| $options->{yAxis}{ticks}{customLabels} = $axes->yaxis('tick_label_custom'); | ||
| } else { | ||
| $options->{yAxis}{ticks}{labelFormat} = $axes->yaxis('tick_label_format'); | ||
| $options->{yAxis}{ticks}{labelDigits} = $axes->yaxis('tick_label_digits'); | ||
| } | ||
| $options->{yAxis}{ticks}{scaleSymbol} = $axes->yaxis('tick_scale_symbol'); | ||
| $options->{yAxis}{arrowsBoth} = $axes->yaxis('arrows_both'); | ||
| $options->{yAxis}{overrideOptions} = $axes->yaxis('jsx_options') if $axes->yaxis('jsx_options'); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2923,7 +2923,7 @@ sub image { | |
| ); | ||
| next; | ||
| } | ||
| if (ref $image_item eq 'Plots::Plot') { | ||
| if (ref $image_item eq 'Plots::Plot' || ref $image_item eq 'Plots::StatPlot') { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be worthwhile to make this more general, for future extension macros. Maybe call your package
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also think there are some other places that might need to be updated, I recall having to modify a few places to check for the ref being equal to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally this would be an When I was creating the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, line 2946 below needs to check the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DO NOT add this ref check to either The As to the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wondering what to do with this. When you say that the Suggestions for updating this? |
||
| # Update image attributes as needed. | ||
| $image_item->{width} = $width if $out_options{width}; | ||
| $image_item->{height} = $height if $out_options{height}; | ||
|
|
@@ -2942,10 +2942,7 @@ sub image { | |
| $width_ratio = 0.001 * $image_item->{tex_size}; | ||
| } | ||
| $image_item = insertGraph($image_item) | ||
| if (ref $image_item eq 'WWPlot' | ||
| || ref $image_item eq 'Plots::Plot' | ||
| || ref $image_item eq 'PGlateximage' | ||
| || ref $image_item eq 'PGtikz'); | ||
| if (grep { ref $image_item eq $_ } ('WWPlot', 'Plots::Plot', 'Plots::StatPlot', 'PGlateximage', 'PGtikz')); | ||
| my $imageURL = alias($image_item) // ''; | ||
| $imageURL = ($envir{use_site_prefix}) ? $envir{use_site_prefix} . $imageURL : $imageURL; | ||
| my $id = $main::PG->getUniqueName('img'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all changes to this file. This pull request no longer should have any changes to this file.