nevensky / plotly-mathematica Goto Github PK
View Code? Open in Web Editor NEWA package for plotting plot.ly graphs in Wolfram Mathematica
A package for plotting plot.ly graphs in Wolfram Mathematica
The current package is supported in Mathematica 10.0.0+ only. In the future parts of the code should be rewritten to use Mathematica JSON instead of version 10 specific functions.
Plotly[Re[Log[x]*Sin[x^2]/Tan[x^2]],{x,-10,10}] outputs only the positive part of the plot.
Likely an error with the messy string postfix.
Styling options as well as labelling don't work yet
Examples
AxesLabel->""
PlotLabel->""
PlotStyle->""
I am new to plotly. Installed package into mathematica, but all Plotly commands
Needs["Plotly`"]
Plotly[Sin[Exp[x]], {x, -Pi, Pi}, AxesLabel -> {"e", "s"}]
just return
[...]
\!\(
TagBox[
ButtonBox[
PaneSelectorBox[{False->
FrameBox[
RowBox[{"Show", "[",
RowBox[{"$Failed", ",",
RowBox[{"ImageSize", "->", "Large"}]}], "]"}],
StripOnInput->False], True->
StyleBox[
FrameBox[
RowBox[{"Show", "[",
RowBox[{"$Failed", ",",
RowBox[{"ImageSize", "->", "Large"}]}], "]"}],
StripOnInput->False], "HyperlinkActive"]}, Dynamic[
CurrentValue["MouseOver"]],
BaseStyle->{"Hyperlink"},
FrameMargins->0,
ImageSize->Automatic],
BaseStyle->"Hyperlink",
ButtonData:>{
StringReplace[
Failure["ConnectionFailure",
Association[
"URL" -> "https://plot.ly/clientresp",
"MessageTemplate" -> "Unable to perform the request.",
"MessageParameters" -> Association[],
"HTTPRequest" -> HTTPRequest["https://plot.ly/clientresp",
Association[
"Body" -> {"un" -> "Mathematica", "key" -> "u1ns4bx2df",
"origin" -> "plot", "platform" -> "mathematica",
"args" -> "[{\"x\":[-3.14159, -3.04159, -2.94159, \
-2.84159, -2.74159, -2.64159, -2.54159, -2.44159, -2.34159, -2.24159, \
-2.14159, -2.04159, -1.94159, -1.84159, -1.74159, -1.64159, -1.54159, \
-1.44159, -1.34159, -1.24159, -1.14159, -1.04159, -0.941593, \
-0.841593, -0.741593, -0.641593, -0.541593, -0.441593, -0.341593, \
-0.241593, -0.141593, -0.0415927, 0.0584073, 0.158407, 0.258407, \
0.358407, 0.458407, 0.558407, 0.658407, 0.758407, 0.858407, 0.958407, \
1.05841, 1.15841, 1.25841, 1.35841, 1.45841, 1.55841, 1.65841, \
1.75841, 1.85841, 1.95841, 2.05841, 2.15841, 2.25841, 2.35841, \
2.45841, 2.55841, 2.65841, 2.75841, 2.85841, 2.95841, \
3.05841],\"y\":[0.0432005, 0.0477406, 0.0527571, 0.0582996, \
0.0644229, 0.0711874, 0.0786596, 0.0869124, 0.0960262, 0.106089, \
0.117198, 0.129457, 0.142984, 0.157901, 0.174346, 0.192463, 0.212409, \
0.234351, 0.258461, 0.284921, 0.313912, 0.345613, 0.380194, 0.417801, \
0.458543, 0.50247, 0.549546, 0.599608, 0.652317, 0.707091, 0.763021, \
0.818767, 0.872427, 0.921391, 0.962172, 0.990251, 0.999942, 0.98436, \
0.935573, 0.845082, 0.704837, 0.509026, 0.256902, -0.0432507, \
-0.369265, -0.680467, -0.915808, -0.999245, -0.858452, -0.461777, \
0.12996, 0.720723, 0.99979, 0.694295, -0.142573, -0.912486, \
-0.770857, 0.341827, 0.990716, -0.0666865, -0.988015, 0.405664, \
0.642328],\"type\":\"scatter\"}]",
"kwargs" -> "{\n \"filename\": \"mathematicaplot\",\n \
\"fileopt\": \"new\",\n \"style\": {\n \"type\": \"scatter\"\n \
},\n \"traces\": [0,1,2],\n \"layout\": {\n \"title\": \"a \
plot from the mathematica api v0.2\"\n },\n \"world_readable\": \
true\n}"}]], "Counter" -> 1]], {
"\"" -> "", "{" -> "", "}" -> "", "url" -> "",
StringExpression["message",
BlankSequence[]] -> "", Whitespace -> "", "," -> "", ":" -> "",
"https" -> "https:"}], None},
ButtonNote->ButtonData],
Annotation[#,
StringReplace[
Failure["ConnectionFailure",
Association[
"URL" -> "https://plot.ly/clientresp",
"MessageTemplate" -> "Unable to perform the request.",
"MessageParameters" -> Association[],
"HTTPRequest" -> HTTPRequest["https://plot.ly/clientresp",
Association[
"Body" -> {"un" -> "Mathematica", "key" -> "u1ns4bx2df",
"origin" -> "plot", "platform" -> "mathematica",
"args" -> "[{\"x\":[-3.14159, -3.04159, -2.94159, \
-2.84159, -2.74159, -2.64159, -2.54159, -2.44159, -2.34159, -2.24159, \
-2.14159, -2.04159, -1.94159, -1.84159, -1.74159, -1.64159, -1.54159, \
-1.44159, -1.34159, -1.24159, -1.14159, -1.04159, -0.941593, \
-0.841593, -0.741593, -0.641593, -0.541593, -0.441593, -0.341593, \
-0.241593, -0.141593, -0.0415927, 0.0584073, 0.158407, 0.258407, \
0.358407, 0.458407, 0.558407, 0.658407, 0.758407, 0.858407, 0.958407, \
1.05841, 1.15841, 1.25841, 1.35841, 1.45841, 1.55841, 1.65841, \
1.75841, 1.85841, 1.95841, 2.05841, 2.15841, 2.25841, 2.35841, \
2.45841, 2.55841, 2.65841, 2.75841, 2.85841, 2.95841, \
3.05841],\"y\":[0.0432005, 0.0477406, 0.0527571, 0.0582996, \
0.0644229, 0.0711874, 0.0786596, 0.0869124, 0.0960262, 0.106089, \
0.117198, 0.129457, 0.142984, 0.157901, 0.174346, 0.192463, 0.212409, \
0.234351, 0.258461, 0.284921, 0.313912, 0.345613, 0.380194, 0.417801, \
0.458543, 0.50247, 0.549546, 0.599608, 0.652317, 0.707091, 0.763021, \
0.818767, 0.872427, 0.921391, 0.962172, 0.990251, 0.999942, 0.98436, \
0.935573, 0.845082, 0.704837, 0.509026, 0.256902, -0.0432507, \
-0.369265, -0.680467, -0.915808, -0.999245, -0.858452, -0.461777, \
0.12996, 0.720723, 0.99979, 0.694295, -0.142573, -0.912486, \
-0.770857, 0.341827, 0.990716, -0.0666865, -0.988015, 0.405664, \
0.642328],\"type\":\"scatter\"}]",
"kwargs" -> "{\n \"filename\": \"mathematicaplot\",\n \
\"fileopt\": \"new\",\n \"style\": {\n \"type\": \"scatter\"\n \
},\n \"traces\": [0,1,2],\n \"layout\": {\n \"title\": \"a \
plot from the mathematica api v0.2\"\n },\n \"world_readable\": \
true\n}"}]], "Counter" -> 1]], {
"\"" -> "", "{" -> "", "}" -> "", "url" -> "",
StringExpression["message",
BlankSequence[]] -> "", Whitespace -> "", "," -> "", ":" -> "",
"https" -> "https:"}], "Hyperlink"]& ]\)
The package doesn't follow general practices for Mathematica package development. The Module[] function wasn't implemented for localized variables.
Just a suggestion - renaming the repo to have the keywords separated by hyphens will likely help it appear when people are searching for this on google! Here is a reference: https://www.mattcutts.com/blog/dashes-vs-underscores/. Github handles the redirects, so all of the links to https://github.com/Nevensky/plotlymathematica should redirect to the new name.
A full list of those functions is not yet known
As a general rule these functions contain divisions by zero for a certain variable or imaginary values.
This issue makes it impossible to use plotlymathematica for any serious work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.