where does this histogram come from?

Hey guys, in the below code I call a histogram but I have no idea what library I call it from (plots or pyplot?) or if it’s built in to Julia or what. can anybody provide any insight? I can’t find it in the julia or the plots documentation, in fact in plots I can only find the plot() function.

More broadly, how can I see all of the functionality in a given library? I keep finding myself not knowing how to do something because I can’t find the right method to achieve it.

here’s the code:

using DataFrames
using CSV
using Plots
using PyPlot

df = CSV.read(“data/train.csv”, header = true, delim = “,”)

for column_name in names(df)[2:end]
…some unimportant stuff…
display(histogram(df[column_name]))
end

methods(histogram)

should display the source locations for all defined methods.

parentmodule(histogram)

will tell you the module it comes from.

  1. ?ModuleName at the REPL if it is documented (sadly, many modules aren’t),
  2. online docs, usually linked from the Github repository (this is usually your best bet for mature packages),
  3. names(ModuleName) will list the symbols it exports, then you can look at their individual help pages.
3 Likes

You can look in StatsBase, i.e.,

06%20AM

and call ?fit for more info.