Get a picture icon when I try to plot a histogram

Hi, I’m trying to make a histogram but whenever I run the command in a jupyter notebook I get a picture icon. I’m using a mac laptop and maybe it is a general issue with the laptop I need to fix.

I don’t use Jupyter, so somebody else might turn up and answer, but they will probably have an easier time doing so if you provide a Minimal Working Example: exactly what code do you run, what do you expect it to do, and how does the actual result differ from the expectation?

More information on how to ask an easily answerable question: Please read: make it easier to help you

Here is the picture of my code

I’m expecting a typical histogram

Please read the post I linked to, especially as it pertains to

  • Pasting code vs screenshots
  • The W in MWE

If I run your code I get ERROR: Undefined variable "histogram". (Or possibly "samples", both of those are undefined, and I don’t off the top of my head know which triggers the error first here)

''using Random
using Plots
using QuadGK
using Roots
using BenchmarkTools

for readability, these are good settings to use

default(xtickfontsize=14, ytickfontsize=14,
guidefontsize=14, legendfontsize=12, lw=2,ms=8)

Initialize value of n

n = 10

Devise function that calculates random uniform, then takes lowest near integer using floor function

function inv_sample_unif()
a = rand();
X = floor(a*(n+1));
return X

Set number of samples

num = 10^4;

samples = [inv_sample_unif() for _ in 1:num];

histogram(samples, label = “Samples”, norm = :pdf,legend=:topleft)‘’

Here is my code. I think the issue may be with my computer settings if anything. Very new to this so apologies of this is insufficient.