-
Notifications
You must be signed in to change notification settings - Fork 631
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
Solved the LaTeX2exp error. Closes #2027 #2030
Merged
cpsievert
merged 13 commits into
plotly:master
from
moutikabdessabour:ggplotly_latex_rendering
Nov 1, 2021
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
453b10e
Solved the LaTeX2exp error. Closes #2027
moutikabdessabour 823c516
Solved issues with the checks
moutikabdessabour ee146c5
Solved issues with the checks
moutikabdessabour 71df890
Trying to solve the issue with the checks.
moutikabdessabour e559130
Trying to solve the issue with the checks.
moutikabdessabour ea35806
Trying to solve the issue with the checks.
moutikabdessabour 99cd9da
R-CMD-CHECK warning resolved.
moutikabdessabour e27621c
Conformed with the review
moutikabdessabour d915b9c
Reverted changes to the _snaps folder
moutikabdessabour 37a4ae6
Use `basename(file)` instead of file as the directory has already cha…
moutikabdessabour 6fb00c9
Added a test that showcases this functionality
moutikabdessabour 8c765f1
Added informative test message
moutikabdessabour 6d29bad
Removing `TeX` class easily
moutikabdessabour File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
library(latex2exp) | ||
|
||
test_that("latex2exp expressions render correctly", { | ||
p <- qplot(1, "A")+ | ||
ylab(TeX("$\\frac{2hc^2}{\\lambda^\\beta}$"))+ | ||
xlab(TeX("$\\alpha$")) | ||
|
||
expect_doppelganger(config(ggplotly(p), mathjax="cdn"), "latex2exp-rendering") | ||
}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
test_that("add_area() works", { | ||
data(wind) | ||
p <- plot_ly(wind, r = ~r, theta = ~t) %>% | ||
add_area(color = ~nms) %>% | ||
layout( | ||
polar = list( | ||
radialaxis = list(ticksuffix = "%"), | ||
angularaxis = list(rotation = 90) | ||
) | ||
) | ||
expect_doppelganger_built(p, "add-area") | ||
}) | ||
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. Please rebase these changes off of |
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.
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.
What's the purpose of this change?
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.
I had issues when using
write_plotly_csv
when not in the _snaps/test-file folder. You were already changing the working directory but if I passed in a name like_snaps/test/file_name.svg
and I was intestthat
folder thewriteLines
call would try to write to_snaps/test/file_name.svg
from_snaps/test
which would cause an issue.