gcodegraphics set_plot_colors

More
5 years 2 weeks ago #223341 by cmorley

preference file/tool table, that would be slick.
Here is my crude axis implementation
Code:
def backplot():            # tool 1 = #Red (255,0,0)       if s.tool_in_spindle == 1:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (255,0,0,255),                                     (255,0,0,255),                                     (255,255,255,255),                                     (0,255,255,255))       #tool 2 = #Lime (0,255,0)       elif s.tool_in_spindle == 2:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (0,255,0,255),                                     (0,255,0,255),                                     (255,255,255,255),                                     (0,255,255,255))                                                                                 #tool 8 = #Blue (0,0,255)       elif s.tool_in_spindle == 8:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (0,0,255,255),                                     (0,0,255,255),                                     (255,255,255,255),                                     (0,255,255,255))                                     #tool 22 = #Yellow (255,255,0)       elif s.tool_in_spindle == 22:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (255,255,0,255),                                     (255,255,0,255),                                     (255,255,255,255),                                     (0,255,255,255))          #tool 24 = #Cyan (0,255,255)       elif s.tool_in_spindle == 24:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (0,255,255,255),                                     (0,255,255,255),                                     (255,255,255,255),                                     (0,255,255,255))                                                                                                                 #tool 7 = #Magenta / (255,0,255)       elif s.tool_in_spindle == 7:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (255,0,255,255),                                     (255,0,255,255),                                     (255,255,255,255),                                     (0,255,255,255))                                       #tool 18 = #Maroon (128,0,0)       elif s.tool_in_spindle == 18:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (128,0,0,255),                                     (128,0,0,255),                                     (255,255,255,255),                                     (0,255,255,255))                                                    #tool 3 = #Olive (128,128,0)       elif s.tool_in_spindle == 3:             live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (128,128,0,255),                                     (128,128,0,255),                                     (255,255,255,255),                                     (0,255,255,255))                                                                                                                                             else:              live_plotter.logger.set_colors((255,0,0,255),                                     (0,255,0,255),                                     (0,255,0,255),                                     (0,255,0,255),                                     (255,255,255,255),                                     (0,255,255,255))       
 

There is also
Code:
live_plotter.
logger.get_colors (for AXIS) to get all the currently used colors. Useful if you only want to change one color.

 

Please Log in to join the conversation.

Time to create page: 1.641 seconds
Powered by Kunena Forum