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
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)
guidefontsize=14, legendfontsize=12, lw=2,ms=8)
n = 10
a = rand();
X = floor(a*(n+1));
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.