Skip to content

Configure legend box for too many legends #30

@v0dro

Description

@v0dro

If there are too many legends, for example in this spec:

      it "adjust legends if there are too many", focus: true do
        @figure = Rubyplot::Figure.new
        axes = @figure.add_subplot 0,0
        axes.title = "My graph."
        [
          [[1, 2, 3, 4, 4, 3], 'Apples oranges Watermelon'],
          [[4, 8, 7, 9, 8, 9], "Oranges"],
          [[2, 3, 1, 5, 6, 8], "Watermelon"],
          [[9, 9, 10, 8, 7, 9], "Peaches"]
        ].each do |d, name|
          axes.bar! do |p|
            p.data d
            p.label = name
          end
        end
        axes.x_ticks = ['2003', '', '2004', '', '2005']
      end

The legend box should properly be configured such that it is displayed appropriately.

Also make sure MultiBar handles legends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomers. Approx. time to solve 0-2 hours.type: minor bumpIncremental update without API breaks

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions