Set line style the same for all columns

2012-02-14
2012-11-18
  • MasterOfPants
    MasterOfPants
    2012-02-14

    Hello,

    I have several 2D plots I'd like to make with over 500 XY data sets (eg individual lines per plot) each. I'd like each line to have the same color and symbol. Is there a way to do this without manually doing so several thousand times? I read through the python source code in the download but don't see where the graph or layer classes are defined. layer.__dict__, according to the interpreter, is empty(??) which doesn't help, and dir(layer) gives me way too many inherited functions to figure out which one I'm looking for.  I've read the resources in this post: https://sourceforge.net/projects/scidavis/forums/forum/708156/topic/3380408, but I'm just not familiar enough with the contents of the sip file (I guess that maps from py->c++?) to figure out what command I need to set the style of a line.

    Thanks for any help provided.

     
  • MasterOfPants
    MasterOfPants
    2012-02-14

    Of course, shortly after I gave up looking I figured it out. help() is, it turns out, extremely helpful. Anyway, so that someone else doesn't have to go down all the blind alleys I did, here are some useful functions that aren't documented in the manual.

    l = graph.activeLayer() <-documented
    c = l.curve(int curvenumber)
    s = c.symbol()
    s.setColor(int colornumber)
    s.setStyle(int stylenumber) //do help(s) to get stylenumbers
    c.setColor(int colornumber)
    l.replot()