[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#1061828: r-cran-plotly: Can't create any plots



I've done some investigation. If you uninstall r-cran-plotly and then
install plotly directly from CRAN (same version), then the plot from the
example renders correctly:

$ sudo apt remove r-cran-plotly
> install.packages(pkgs = "https://cran.r-project.org/package=plotly&version=4.10.1";, repos = NULL)
> library(plotly)
> plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length) # works fine!

I've run the above example firstly with r-cran-plotly installed and then
with the CRAN version installed to see the differences in resulting
files. The only files that differ are 'index.html', 'plotly-latest.min.js'
and 'typedarray.min.js'.

$ diff -qr plotly_packaged plotly_cran
Files plotly_packaged/index.html and plotly_cran/index.html differ
Files plotly_packaged/lib/plotly-main-2.11.1/plotly-latest.min.js and plotly_cran/lib/plotly-main-2.11.1/plotly-latest.min.js differ Files plotly_packaged/lib/typedarray-0.1/typedarray.min.js and plotly_cran/lib/typedarray-0.1/typedarray.min.js differ

HTML files are essentially identical, the only difference between them
lays in object id attributes, which are generated randomly. On the other
hand, plotly and typedarray js files are completely different and CRAN
versions appear to be newer, for example:

$ head -n 6 plotly_cran/lib/plotly-main-2.11.1/plotly-latest.min.js
/**
* plotly.js v2.11.1
* Copyright 2012-2022, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/

$ head -n 6 plotly_packaged/lib/plotly-main-2.11.1/plotly-latest.min.js
/**
* plotly.js v1.31.2
* Copyright 2012-2017, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/

Therefore, I think there must be a problem with 'plotly-latest.min.js'
and 'typedarray.min.js' that are packaged in r-cran-plotly. Hope this
helps!

Kind regards,
Przemyslaw


Reply to: