Back to the main page.

Bug 124 - different linestyles for multiple lines in the same plot

Status CLOSED FIXED
Reported 2010-07-28 00:14:00 +0200
Modified 2010-07-29 17:31:13 +0200
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P1 enhancement
Assigned to: Roemer van der Meij
URL:
Tags:
Depends on:
Blocks:
See also:

Matt Mollison - 2010-07-28 00:14:05 +0200

ft_singleplotER can handle receiving multiple data structures (e.g., ft_singleplotER(cfg, data1, data2, ..., dataN)) and can plot each of those in a different color with cfg.graphcolor, but it cannot plot each data structure in a different linestyle. It would be nice to be able to do this, especially because it is good to make sure the lines look different if the plots were printed out on a grayscale printer. I suggest allowing input of linestyles as a cell, e.g., cfg.linestyle = {'--','-.','-'};. You would just have to change the ~isfield(cfg,'linestyle') command to make '-' a cell, and change the linestyle input in the ft_plot_vector to cfg.linestyle{k-1}.


Matt Mollison - 2010-07-28 00:31:44 +0200

You would also want to check that the linestyle is a string in a cell in case the user inputs something like cfg.linestyle = '--'.


Roemer van der Meij - 2010-07-29 17:30:46 +0200

Hi Matt, Thanks for your suggestion! I just implemented it, an updated version should be on our ftp-server this evening. Best, Roemer