Skip to content

Commit

Permalink
Merge pull request #1610 from vaerksted/master
Browse files Browse the repository at this point in the history
fix typos
  • Loading branch information
bjarthur authored Mar 19, 2023
2 parents 186609e + e59d145 commit dcd70b6
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ Each release typically has a number of minor bug fixes beyond what is listed her
* Add a `group` aesthetic to allow plotting lines of the same color without
using multiple layers.

* Better herustics for choosing histogram bin counts.
* Better heuristics for choosing histogram bin counts.

* Add `Guide.manual_color_key` which lets one completely specify the colors
and entries in a color key.
Expand Down
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ first plot is to rarely close your REPL session.
establishes a mechanism which automatically reloads code after it has been
modified, thereby reducing the need to restart.

Alternatively, one can avoid the first-time-to-plot penalty altogther by
Alternatively, one can avoid the first-time-to-plot penalty altogether by
ahead-of-time (AOT) compiling Gadfly into the Julia system image using
[PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl).

Expand All @@ -69,7 +69,7 @@ mkdir $HOME/JuliaGadflySysImage
cd $HOME/JuliaGadflySysImage
```

one can complile Gadfly.jl and create the sysimage as follows:
one can compile Gadfly.jl and create the sysimage as follows:

```julia
(@v.1.4) pkg> add PackageCompiler
Expand All @@ -80,7 +80,7 @@ julia> create_sysimage(:Gadfly; sysimage_path="GadFlySysimage.so")
julia> exit()
```

At the end of the resulting copius output will be the command to launch this
At the end of the resulting copious output will be the command to launch this
custom version of julia: something like `julia --sysimage $HOME/JuliaGadflySysImage/GadFlySysimage.so`.
Make it convenient by putting an alias in your .bashrc: `alias julia-gadfly="julia --sysimage ..."`.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/man/backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ p = plot(...)
draw(SVG("foo.svg", 6inch, 4inch), p)
```

one can more succintly use Julia's function chaining syntax:
one can more succinctly use Julia's function chaining syntax:

```julia
p |> SVG("foo.svg", 6inch, 4inch)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/man/compositing.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ title(hstack(p1,p2), "My creative title")

## Layers

_Introduction:_ Draw multiple layers onto the same plot by inputing `Layer` objects to `plot`.
_Introduction:_ Draw multiple layers onto the same plot by inputting `Layer` objects to `plot`.

```@setup layer
using Gadfly, RDatasets, Distributions
Expand Down
4 changes: 2 additions & 2 deletions src/Gadfly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export Plot, Layer, Theme, Col, Row, Scale, Coord, Geom, Guide, Stat, Shape, ren
@deprecate star1 Shape.star1
@deprecate star2 Shape.star2
@deprecate hexagon Shape.hexagon
@deprecate octogon Shape.octogon
@deprecate octagon Shape.octagon
@deprecate hline Shape.hline
@deprecate vline Shape.vline

Expand Down Expand Up @@ -112,7 +112,7 @@ const ElementOrFunction{T <: Element} = Union{Element, Base.Callable, Theme}
const gadflyjs = joinpath(dirname(Base.source_path()), "gadfly.js")


# Set prefereed canvas size when rendering a plot without an explicit call to
# Set preferred canvas size when rendering a plot without an explicit call to
# `draw`.
"""
set_default_plot_size(width::Compose.MeasureOrNumber,
Expand Down
10 changes: 5 additions & 5 deletions src/bincount.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
# methods that all seem to give good results with little difference. Birge's
# method is simple (it's just AIC with an extra logarithmic term), has a decent
# theoretical justification, and is general enough to apply to multidimensional
# and non-regular bin selecetion problems. Though, the penalty they use was
# and non-regular bin selection problems. Though, the penalty they use was
# optimized for regular histograms, so may need to be tweaked.
#
# The Birge penalty is
# penalty(D) = D - 1 + log(D)^2.5
# where D is the number of bins. The 2.5 constant was arrived at emperically by
# where D is the number of bins. The 2.5 constant was arrived at empirically by
# optimizing over samples from example density functions.
#

Expand Down Expand Up @@ -89,7 +89,7 @@ end
#
# Returns:
# A tuple of the form (d, bincounts, x_max), where d gives the optimal number of
# bins, and bincounts is an array giving the number of occurances in each
# bins, and bincounts is an array giving the number of occurrences in each
# bin, and x_max is the end point of the final bin.
#
function choose_bin_count_1d(xs::AbstractVector, d_min=1, d_max=150)
Expand Down Expand Up @@ -147,7 +147,7 @@ end
#
# Returns
# A tuple of the form (d, bincounts, x_max), where d gives the optimal number of
# bins, and bincounts is an array giving the number of occurances in each
# bins, and bincounts is an array giving the number of occurrences in each
# bin, and x_max is the end point of the final bin.
#
function choose_bin_count_1d_discrete(xs::AbstractArray, xs_set::AbstractArray,
Expand Down Expand Up @@ -222,7 +222,7 @@ function choose_bin_count_2d(xs::AbstractVector, ys::AbstractVector,
xminbincount::Int, xmaxbincount::Int,
yminbincount::Int, ymaxbincount::Int)

# For two demensions, I'm just going to optimize the marginal bin counts.
# For two dimensions, I'm just going to optimize the marginal bin counts.
# This might not be optimal, but its simple and fast.

x_min, x_max = Gadfly.concrete_minimum(xs), Gadfly.concrete_maximum(xs)
Expand Down
4 changes: 2 additions & 2 deletions src/gadfly.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/geom/hvband.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Geom.band[(; orientation=:vertical)]
Draw bands across the plot canvas with a horizontal span specifed by `xmin` and `xmax` if `orientation` is `:vertical`, or a vertical span specified by `ymin` and `ymax` if the `orientation` is `:horizontal`.
Draw bands across the plot canvas with a horizontal span specified by `xmin` and `xmax` if `orientation` is `:vertical`, or a vertical span specified by `ymin` and `ymax` if the `orientation` is `:horizontal`.
This geometry is equivalent to [`Geom.rect`](@ref) with [`Stat.band`](@ref).
"""
Expand Down
4 changes: 2 additions & 2 deletions src/geom/label.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function deferred_label_context(geom::LabelGeometry,
# once, rather than every iteration of annealing.
possible_overlaps = [Array{Int}(undef, 0) for _ in 1:length(label_point_boxes)]

# TODO: this whole thing would be much more effecient if we forbid from
# TODO: this whole thing would be much more efficient if we forbid from
# the start labels that overlap points. We should be able to precompute
# that, since they're static.

Expand Down Expand Up @@ -129,7 +129,7 @@ function deferred_label_context(geom::LabelGeometry,
0mm < a.x0[2] && a.x0[2] + a.a[2] < parent_box.a[2]

# This variable holds the value of the objective function we wish to
# minimize. A label overlap is a penalty of 1. Other penaties (out of bounds
# minimize. A label overlap is a penalty of 1. Other penalties (out of bounds
# labels, hidden labels) or calibrated to that.
total_penalty = 0.0

Expand Down
2 changes: 1 addition & 1 deletion src/guide.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ end


# A guide graphic is a position associated with one or more contexts.
# Multiple contexts represent multiple layout possibilites that will be
# Multiple contexts represent multiple layout possibilities that will be
# optimized over.
struct PositionedGuide
ctxs::Vector{Context}
Expand Down
6 changes: 3 additions & 3 deletions src/mapping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end # module Col

module Row

# represent a row index correspondig to a set of columns
# represent a row index corresponding to a set of columns
struct GroupedColumnRowIndex
columns::Union{Nothing,Vector}
end
Expand Down Expand Up @@ -91,7 +91,7 @@ function meltdata(U::AbstractVector, colgroups_::Vector{Col.GroupedColumn})
end

# otherwise it doesn't make much sense
error("Col.index/Col.value can only be used without arguments when plotting an array of heterogenous arrays")
error("Col.index/Col.value can only be used without arguments when plotting an array of heterogeneous arrays")
end
colgroup = first(colgroups)
colmap = Dict{Any, Int}()
Expand Down Expand Up @@ -208,7 +208,7 @@ function _evalmapping!(mapping::Dict, data_source, data::Data)
return data_source
end

# Evalute aesthetic mappings producting a Data instance.
# Evaluate aesthetic mappings producing a Data instance.
evalmapping!(mapping::Dict, data_source::MeltedData, data::Data) =
_evalmapping!(mapping, data_source, data)

Expand Down
2 changes: 1 addition & 1 deletion src/scale.jl
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ easiest way to get that data to plot appropriately.
`labels` is either a function which maps a coordinate value to a string label,
or a vector of strings of the same length as the number of unique values in the
aesthetic. `levels` gives values for the scale. Order will be respected and
anything in the data that's not respresented in `levels` will be set to
anything in the data that's not represented in `levels` will be set to
`missing`. `order` is a vector of integers giving a permutation of the levels
default order.
Expand Down
2 changes: 1 addition & 1 deletion src/scale/scales.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function apply_scale(scale::ContinuousSizeScale, aess::Vector{Gadfly.Aesthetics}
Δ = scale.trans.f(ticks[end])-scale.trans.f(ticks[1])
labels = scale.trans.label(ticks)

# Transform ticks e.g. to areas/porportions/sizes
# Transform ticks e.g. to areas/proportions/sizes
keyvals = if scale.maxvalue===nothing
showvals = false
scale.trans.f.(ticks.-smin)
Expand Down
2 changes: 1 addition & 1 deletion src/theme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ current_theme() = theme_stack[end]
"""
style(; kwargs...) -> Theme
Return a new `Theme` that is a copy of the current theme as modifed by the
Return a new `Theme` that is a copy of the current theme as modified by the
attributes in `kwargs`. See [Themes](@ref) for available fields.
# Examples
Expand Down
4 changes: 2 additions & 2 deletions src/ticks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ optimize_ticks() = Any[]
# tight fit around the data, optimal number of ticks, and simple numbers.
#
# Args:
# x_min: minimum value occuring in the data.
# x_max: maximum value occuring in the data.
# x_min: minimum value occurring in the data.
# x_max: maximum value occurring in the data.
# Q: tick intervals and scores
# k_min: minimum number of ticks
# k_max: maximum number of ticks
Expand Down
2 changes: 1 addition & 1 deletion test/testscripts/stat_binmean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ p2 = plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth", color =
p3 = plot(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth", color="Species", Stat.binmean(n=3), Geom.point)
# integer works
p4 = plot(x= rand(1:10, 100), y = rand(1:10, 100), Stat.binmean, Geom.point)
# surimpose regression
# superimpose regression
p5 = plot(
layer(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth", color="Species", Stat.binmean(n=5), Geom.point),
layer(dataset("datasets", "iris"), x="SepalLength", y="SepalWidth", color="Species", Geom.smooth(method=:lm))
Expand Down

0 comments on commit dcd70b6

Please sign in to comment.