Skip to content

Scatter plot does not work with group  #328

@itsdfish

Description

@itsdfish

The following code is a MWE showing that scatter plots do not work for group. The second and third rows of the grid have the wrong scale and no data are displayed. Specifying xlims=(0,3) and ylims=(0,3) fixes the axes but no data are displayed.

using DataFrames, StatsPlots
  title = [string("f1: ",i," ","f2: ",j) for i in 1:3 for j in 1:3]
  title = reshape(title, 1, 9)
df = DataFrame(f1=repeat(1:3,inner=5),f2=repeat(1:3,inner=5),
  z=repeat(1:3,outer=5), y=repeat(1:3,outer=5))

  @df df scatter(:z, :y, group=(:f1,:f2), xlabel="z",
    ylabel="y", xaxis=font(10), yaxis=font(10), grid=false, color=:grey,
     leg=false, titlefont=font(10), title=title, layout=(3,3))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions