<commit_before>
# Geometry which displays points at given (x, y) positions.
immutable PointGeometry <: Gadfly.GeometryElement
end


const point = PointGeometry


function element_aesthetics(::PointGeometry)
    [:x, :y, :size, :color]
end


# Generate a form for a point geometry.
#
# Args:
#   geom: point geometry.
#   theme: the plot's theme.
#   aes: aesthetics.
#
# Returns:
#   A compose Form.
#
function render(geom::PointGeometry, theme::Gadfly.Theme, aes::Gadfly.Aesthetics)
    Gadfly.assert_aesthetics_defined("Geom.point", aes, :x, :y)
    Gadfly.assert_aesthetics_equal_length("Geom.point", aes,
                                          element_aesthetics(geom)...)

    default_aes = Gadfly.Aesthetics()
    default_aes.color = PooledDataArray(ColorValue[theme.default_color])
    default_aes.size = Measure[theme.default_point_size]
    aes = inherit(aes, default_aes)

    lw_hover_scale = 10
    lw_ratio = theme.line_width / aes.size.abs
    compose(circle(aes.x, aes.y, aes.size),
            fill(aes.color),
            stroke([theme.highlight_color(c) for c in aes.color]),
            linewidth(theme.line_width),
            d3embed(@sprintf(".on(\"mouseover\", geom_point_mouseover(%0.2f, %0.2f), false)",
                             lw_hover_scale, lw_ratio)),
            d3embed(@sprintf(".on(\"mouseout\", geom_point_mouseout(%0.2f, %0.2f), false)",
                             lw_hover_scale, lw_ratio)),
            aes.color_key_continuous == true ?
                svgclass("geometry") :
                svgclass([@sprintf("geometry color_%s", escape_id(aes.color_label([c])[1]))
                          for c in aes.color]))
end

<commit_msg>Fix issue with size aesthetic.<commit_after>
# Geometry which displays points at given (x, y) positions.
immutable PointGeometry <: Gadfly.GeometryElement
end


const point = PointGeometry


function element_aesthetics(::PointGeometry)
    [:x, :y, :size, :color]
end


# Generate a form for a point geometry.
#
# Args:
#   geom: point geometry.
#   theme: the plot's theme.
#   aes: aesthetics.
#
# Returns:
#   A compose Form.
#
function render(geom::PointGeometry, theme::Gadfly.Theme, aes::Gadfly.Aesthetics)
    Gadfly.assert_aesthetics_defined("Geom.point", aes, :x, :y)
    Gadfly.assert_aesthetics_equal_length("Geom.point", aes,
                                          element_aesthetics(geom)...)

    default_aes = Gadfly.Aesthetics()
    default_aes.color = PooledDataArray(ColorValue[theme.default_color])
    default_aes.size = Measure[theme.default_point_size]
    aes = inherit(aes, default_aes)

    lw_hover_scale = 10
    lw_ratio = theme.line_width / aes.size[1]
    compose(circle(aes.x, aes.y, aes.size),
            fill(aes.color),
            stroke([theme.highlight_color(c) for c in aes.color]),
            linewidth(theme.line_width),
            d3embed(@sprintf(".on(\"mouseover\", geom_point_mouseover(%0.2f, %0.2f), false)",
                             lw_hover_scale, lw_ratio)),
            d3embed(@sprintf(".on(\"mouseout\", geom_point_mouseout(%0.2f, %0.2f), false)",
                             lw_hover_scale, lw_ratio)),
            aes.color_key_continuous == true ?
                svgclass("geometry") :
                svgclass([@sprintf("geometry color_%s", escape_id(aes.color_label([c])[1]))
                          for c in aes.color]))
end


{'fraction_non_alphanumeric': 0.1290704558910598, 'fraction_numerical': 0.007992895204262877, 'mean_word_length': 2.6688382193268185, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3346819', 'n_tokens_mistral': 1166, 'n_tokens_neox': 1090, 'n_words': 210}