Ticket #9058 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Same plot colour when plotting multiple Y table columns

Reported by: Arturs Bekasovs Owned by: Arturs Bekasovs
Priority: major Milestone: Release 3.2
Component: GUI Keywords:
Cc: Blocked By:
Blocking: Tester: Jay Rainey

Description

Run the following script to create a table:

t = WorkspaceFactory.createTable()
t.addColumn("int", "Number")
t.addColumn("double", "Power2")
t.addColumn("double", "Power3")

for i in range(10):
        t.addRow([i, i**2, i**3])

mtd.addOrReplace("table", t)

w = importTableWorkspace("table")

Now select both Y columns in the table and plot them.

Both lines in the resulting plot have the same colour.

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

comment:2 Changed 7 years ago by Arturs Bekasovs

  • Status changed from assigned to inprogress

Refs #9058. Create layout for every curve, not just once.

Otherwise the color and symbol type are set only once and are the same for all the curves.

Changeset: 3519ca9804cd87479d0c20be1399958cd99d884b

comment:3 Changed 7 years ago by Arturs Bekasovs

Refs #9058. Name variable better.

Changeset: e33309e8189f44100d28dbb3fbf3f6c363a907c8

comment:4 Changed 7 years ago by Arturs Bekasovs

Tester:

Check that the problem is fixed. Verify that both colours and symbol types are unique for every column plotted. Try including error columns and verify that they have the same colour as the curves. Check various plot types.

comment:5 Changed 7 years ago by Arturs Bekasovs

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:6 Changed 7 years ago by Jay Rainey

  • Status changed from verify to verifying
  • Tester set to Jay Rainey

comment:7 Changed 7 years ago by Jay Rainey

  • Status changed from verifying to closed

I tested this on Mantid 3.1 to verify the lines were the same colour. I then built locally and tried several plots on varying numbers of Y columns, all of which produced a different colour and symbol for each line. Code is clean with clear variable names.

Last edited 7 years ago by Jay Rainey (previous) (diff)

comment:8 Changed 7 years ago by Jay Rainey

Merge remote-tracking branch 'origin/bugfix/9058_same_colour_for_multiple_y_columns'

Full changeset: 601d72b423761848440910c9692641e02b52a522

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9901

Note: See TracTickets for help on using tickets.