0

with Julia 1.0.3

following this tutorial for plotting with Gadfly (it's from 2015: it might a bit old)

I used the following code:

using RDatasets, Gadfly, Cairo, Plots
sleep = dataset("lme4", "sleepstudy");
plot(sleep, x = "Days", y = "Reaction", Geom.point, Geom.smooth)

and got the following output: Plot(...) instead of a plot. Why am I not seeing a real plot instead

Here is the output of the following command: typeof.(Base.Multimedia.displays):

3-element Array{DataType,1}:
 TextDisplay         
 IJulia.InlineDisplay
 Gadfly.GadflyDisplay
ecjb
  • 5,169
  • 12
  • 43
  • 79
  • 1
    Plots and Gadfly are two different plotting packages that can't be used together. You should drop Plots in this case, as your plotting syntax is Gadfly's. Also, you need to specify which tutorial it is (it may be very outdated), and whether you're in the REPL, in Juno, VSCode, Jupyter, a script or something third. The plotting command is correct enough, but your environment is responsible for showing the plot. – Michael K. Borregaard Jan 05 '19 at 10:48
  • Many thanks for your comment @MichaelK.Borregaard. I inserted the link into the question. Indeed it might be a bit old. I restarted Julia re-ran the script without `Plots` but the output persisted – ecjb Jan 05 '19 at 11:02
  • 1
    What's your output of `typeof.(Base.Multimedia.displays)`? – 张实唯 Jan 05 '19 at 11:21
  • thanks for your comment @张实唯. I wrote the input in the edited question – ecjb Jan 05 '19 at 11:37

0 Answers0