I just installed Julia-Studio 0.4.4 on windows 7. And added the package Winston to try out plotting. So I did as below and got "FramedPlot(...)" output, no graphical figure.
using Winston
x=randn(1,1000);
plot(x)
FramedPlot(...)
What should I do to make it work? Any additional library?
I ran into this same problem. Looks like it was answered in the comments, but for future readers, you need to call display():
using Winston
display( plot( randn(1,1000) ) )
Related
I'm trying to run this simple example, taken directly from the official documentation
using AbstractPlotting.MakieLayout
using AbstractPlotting
scene, layout = layoutscene(resolution = (1200, 900))
ax = layout[1, 1] = LAxis(scene, xlabel = "x label", ylabel = "y label",
title = "Title")
But I get an error at line 1: MakieLayout not defined
I have successfully installed Makie (v0.11.0) and AbstractPlotting (v0.11.2). I still managed to run the example by installing and importing MakieLayout as a separate package but MakieLayout as a package is deprecated and should have been absorbed by AbstractPlotting.
My questions are:
Am I doing something wrong here?
Is this an isolated issue or do other people have the same problem?
I would really appreciate some help if someone knows what is going on here.
AbstractPlotting's current version (Nov 5 2020) is 0.13.5. I recommend updating it before trying to use AbstractPlotting.MakieLayout.
You can update this package by doing
] update AbstractPlotting
If it is not correctly updated, it is possible that some other package is holding it back.
To discover what package is holding it back you can try to add the specific version by doing
] add AbstractPlotting#0.13.5
And you will get a more informative error message.
I advice you to remove the MakieLayout package before updating since this is obsolete and it is probably holding AbstractPlotting's version back.
EDIT (6 November 2020):
Nowadays it is not necessary to install the Makie.jl package. You can safely remove it and add instead:
AbstractPlotting
And one or more of the backends:
GLMakie (] add GLMakie), the fastest and more complete, uses GPU
CairoMakie (] add CairoMakie) if you don't have GPU or want to output to vector graphics
WGLMakie (] add WGLMakie)
the package called Makie is just AbstractPlotting + GLMakie and I think it is on its way out. You should remove the package and change your first line to:
using AbstractPlotting, GLMakie #or your selected backend
using AbstractPlotting.MakieLayout
Information about managing versions and packages can be found here
Is there a compatibility issue with the latest version of R (3.4.2) and ggplot2? My R Shiny app was working two days ago. The plots stopped working yesterday and I noticed that ggplot2 was moved to `tidyverse/ggplot2' in github. I updated the package,
LoadGithubPackage('ggplot2', 'tidyverse/ggplot2')
but still the plots do not look right anymore.
Mine's still working fine, however when using ggplot I'm doing something like this in the server function for shiny:
output$GOOG.forecast <- renderPlot({
b <- GOOG.forecast
plot(b)
})
Just remember when you're doing plot outputs in shiny you have to define the data within the output function (I know it's kinda weird) but this has always worked for me. Otherwise consider using dygraphs if it's appropriate.
Hope this helps!
I would try reverting to CRAN's version of ggplot2 with
install.packages("ggplot2")
and see if that fixes it
Had some recent issues with my workflow. I normally print Rplots as .emf files using the devEMF package, and then edit them in powerpoint. [Import the emf file to powerpoint, right click on image, and select ungroup.] However, recently powerpoint isn't recognizing the vector format when I "ungroup."
I'm using a windows machine and powerpoint 2016.
Any thoughts would be VERY helpful.
Nate
Just to leave a definitive answer here -- Powerpoint does not yet allow editing ("ungrouping") of EMF+ graphics. Thus the solution is to tell devEMF to not use emfPlus features (the downside being that features such as transparency will not be available):
emf(file = "test.emf", emfPlus = FALSE)
plot(1:10)
dev.off()
The original poster's comment worked because the older version of devEMF did not use emfPlus by default.
I did install.packages("choroplethr"), followed by library(choroplethr). I want to find out how to do a zip code choropleth, so I start typing in RStudio,
"?choroplethr::zip..." The only function that RStudio finds is zip_map. I go to its help file and see the following documentation:
This function is deprecated as of choroplethr version 3.0.0. Please
use ?zip_choropleth instead. The last version of choroplethr in which
this function worked was version 2.1.1, which can be downloaded from
CRAN here:
http://cran.r-project.org/web/packages/choroplethr/index.html
Okay, I guess I'll find out about this zip_choroplethr function then.
?choroplethr::zip_choroplethr
# No documentation for ‘zip_choroplethr’ in specified packages and libraries:
# you could try ‘??zip_choroplethr’
Wut.
Thank you for using choroplethr.
zip_map is, indeed, deprecated. It used scatterplots, which wasn't the best way to visualize zip codes, especially because they are so small.
Within choroplethr, Zip code choropleths are managed by a new, separate package: choroplethrZip. You can see the installation instructions and documentation here.
CRAN rejected choroplethrZip due to the size of the map, which is why it is in separate package and on github.
Even while using the sample code given in ggplotly help function... I'm continuously getting the below error
Error in map_layout(panel, plot$facet, layer_data, plot$data) :
unused argument (plot$data)
I had the same issue and followed the solution suggested by #royr2. Specifically, I installed the development version of plotly using devtools::install_github("ropensci/plotly") and restarted my R session and reloaded the package. After that, ggplotly worked again in RStudio.
I know this isn't an answer per se, but this has been documented as known issue with ggplot 2.1.0 - see link:
https://github.com/ropensci/plotly/issues/481