Replit.com PyPlot or Plots (Julia 1.3) vs. Plots in Pluto (Julia 1.6)

Greetings;
I am a high school teacher trying to get students to use Julia 1.3 on Replit.com. Replit.com only has Julia 1.3, not 1.5 or newer.
As shown in the attachment, the plot code works in Julia 1.6 using Pluto.
The same code does not work in Replit.com. 1) provides a blank prompt with no errors 2) takes over a minute to finish compiling (any suggestions to speed up plot, when it does work…


begin
 import Pkg
 Pkg.activate(mktempdir())
end
# using Pkg;
begin
  Pkg.add.(["Plots","Random","PyPlot"]);
  using Plots,PyPlot,Random
  # using GR
 # using PlotlyBase
end
#plotly()  # or gr()
#pyplot()
begin
 x = 1:6;
 y = 1:6
 z = rand(1:10, 1000);
 #Plots.histogram(y,50) 
 #PyPlot.plot(1:10,z)  # did not work??
 Plots.plot(x,y)
end

expecting replit.com to render images for us is unrealistic I would say.

I don’t know repl.it, so Jerry is probably right that rendering images might be an issue there. That said, you might want to look into https://github.com/Evizero/UnicodePlots.jl which are reasonably fast and most importantly are directly printed to the terminal.

1 Like

Greetings;
Thank you for your Uniplot suggestion. It worked with color when I add the code in the terminal. See attachment.

Figure 1 - Using UnicodePlots in the Terminal which results in color plots.

But I could not achieve color output when creating expressions in main.jl with/without Colors/ColorScheme/Plots

Figure 2 - Using UnicodePlots in the Replit.com GUI , which uses Julia 1.3

As a High School Teacher, the unicodePlots package is adequate. I do use Julia 1.6 on my classroom Windows 10 computers, but I can monitor progress and submissions from any remote computer with Replit.com paid subscription. Thank you for your assistance.

3 Likes