Fix sketcher mode handling to prevent unintended line creation during drag operations

Major changes:
- Fixed right-click handler to directly set mode to NONE instead of relying on main app signal handling
- Added safety checks in left-click handler to prevent drawing when no draggable point is found in NONE mode
- Enhanced mode compatibility by treating Python None as SketchMode.NONE in set_mode() method
- Added comprehensive debug logging for mode changes and interaction state tracking
- Resolved integration issue where persistent constraint modes were prematurely reset by main app
- Ensured point dragging is only enabled in NONE mode, preventing accidental polyline creation

This fixes the reported issue where deactivating the line tool would still create lines when dragging,
and ensures proper mode transitions between drawing tools and selection/drag mode.
This commit is contained in:
bklronin
2025-08-16 22:30:18 +02:00
parent 54261bb8fd
commit 11d053fda4
886 changed files with 168708 additions and 51 deletions

View File

@@ -0,0 +1,53 @@
# Solarized color palette taken from https://ethanschoonover.com/solarized/
# Inspired by, and copied from ggthemes https://github.com/jrnold/ggthemes
#TODO:
# 1. Padding to title from face
# 2. Remove top & right ticks
# 3. Give Title a Magenta Color(?)
#base00 ='#657b83'
#base01 ='#93a1a1'
#base2 ='#eee8d5'
#base3 ='#fdf6e3'
#base01 ='#586e75'
#Magenta ='#d33682'
#Blue ='#268bd2'
#cyan ='#2aa198'
#violet ='#6c71c4'
#green ='#859900'
#orange ='#cb4b16'
figure.facecolor : FDF6E3
patch.antialiased : True
lines.linewidth : 2.0
lines.solid_capstyle: butt
axes.titlesize : 16
axes.labelsize : 12
axes.labelcolor : 657b83
axes.facecolor : eee8d5
axes.edgecolor : eee8d5
axes.axisbelow : True
axes.prop_cycle : cycler('color', ['268BD2', '2AA198', '859900', 'B58900', 'CB4B16', 'DC322F', 'D33682', '6C71C4'])
# Blue
# Cyan
# Green
# Yellow
# Orange
# Red
# Magenta
# Violet
axes.grid : True
grid.color : fdf6e3 # grid color
grid.linestyle : - # line
grid.linewidth : 1 # in points
### TICKS
xtick.color : 657b83
xtick.direction : out
ytick.color : 657b83
ytick.direction : out

View File

@@ -0,0 +1,6 @@
# This patch should go on top of the "classic" style and exists solely to avoid
# changing baseline images.
text.kerning_factor : 6
ytick.alignment: center_baseline

View File

@@ -0,0 +1,19 @@
# This style is used for the plot_types gallery. It is considered private.
axes.grid: False
axes.axisbelow: True
figure.figsize: 2, 2
# make it so the axes labels don't show up. Obviously
# not good style for any quantitative analysis:
figure.subplot.left: 0.01
figure.subplot.right: 0.99
figure.subplot.bottom: 0.01
figure.subplot.top: 0.99
xtick.major.size: 0.0
ytick.major.size: 0.0
# colors:
image.cmap : Blues
axes.prop_cycle: cycler('color', ['1f77b4', '82bbdb', 'ccdff1'])

View File

@@ -0,0 +1,19 @@
# This style is used for the plot_types gallery. It is considered part of the private API.
axes.grid: True
axes.axisbelow: True
figure.figsize: 2, 2
# make it so the axes labels don't show up. Obviously
# not good style for any quantitative analysis:
figure.subplot.left: 0.01
figure.subplot.right: 0.99
figure.subplot.bottom: 0.01
figure.subplot.top: 0.99
xtick.major.size: 0.0
ytick.major.size: 0.0
# colors:
image.cmap : Blues
axes.prop_cycle: cycler('color', ['1f77b4', '58a1cf', 'abd0e6'])

View File

@@ -0,0 +1,29 @@
#Author: Cameron Davidson-Pilon, original styles from Bayesian Methods for Hackers
# https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
lines.linewidth : 2.0
patch.linewidth: 0.5
patch.facecolor: blue
patch.edgecolor: eeeeee
patch.antialiased: True
text.hinting_factor : 8
mathtext.fontset : cm
axes.facecolor: eeeeee
axes.edgecolor: bcbcbc
axes.grid : True
axes.titlesize: x-large
axes.labelsize: large
axes.prop_cycle: cycler('color', ['348ABD', 'A60628', '7A68A6', '467821', 'D55E00', 'CC79A7', '56B4E9', '009E73', 'F0E442', '0072B2'])
grid.color: b2b2b2
grid.linestyle: --
grid.linewidth: 0.5
legend.fancybox: True
xtick.direction: in
ytick.direction: in

View File

@@ -0,0 +1,492 @@
### Classic matplotlib plotting style as of v1.5
### LINES
# See https://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more
# information on line properties.
lines.linewidth : 1.0 # line width in points
lines.linestyle : - # solid line
lines.color : b # has no affect on plot(); see axes.prop_cycle
lines.marker : None # the default marker
lines.markerfacecolor : auto # the default markerfacecolor
lines.markeredgecolor : auto # the default markeredgecolor
lines.markeredgewidth : 0.5 # the line width around the marker symbol
lines.markersize : 6 # markersize, in points
lines.dash_joinstyle : round # miter|round|bevel
lines.dash_capstyle : butt # butt|round|projecting
lines.solid_joinstyle : round # miter|round|bevel
lines.solid_capstyle : projecting # butt|round|projecting
lines.antialiased : True # render lines in antialiased (no jaggies)
lines.dashed_pattern : 6, 6
lines.dashdot_pattern : 3, 5, 1, 5
lines.dotted_pattern : 1, 3
lines.scale_dashes: False
### Marker props
markers.fillstyle: full
### PATCHES
# Patches are graphical objects that fill 2D space, like polygons or
# circles. See
# https://matplotlib.org/api/artist_api.html#module-matplotlib.patches
# information on patch properties
patch.linewidth : 1.0 # edge width in points
patch.facecolor : b
patch.force_edgecolor : True
patch.edgecolor : k
patch.antialiased : True # render patches in antialiased (no jaggies)
hatch.color : k
hatch.linewidth : 1.0
hist.bins : 10
### FONT
#
# font properties used by text.Text. See
# https://matplotlib.org/api/font_manager_api.html for more
# information on font properties. The 6 font properties used for font
# matching are given below with their default values.
#
# The font.family property has five values: 'serif' (e.g., Times),
# 'sans-serif' (e.g., Helvetica), 'cursive' (e.g., Zapf-Chancery),
# 'fantasy' (e.g., Western), and 'monospace' (e.g., Courier). Each of
# these font families has a default list of font names in decreasing
# order of priority associated with them. When text.usetex is False,
# font.family may also be one or more concrete font names.
#
# The font.style property has three values: normal (or roman), italic
# or oblique. The oblique style will be used for italic, if it is not
# present.
#
# The font.variant property has two values: normal or small-caps. For
# TrueType fonts, which are scalable fonts, small-caps is equivalent
# to using a font size of 'smaller', or about 83% of the current font
# size.
#
# The font.weight property has effectively 13 values: normal, bold,
# bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as
# 400, and bold is 700. bolder and lighter are relative values with
# respect to the current weight.
#
# The font.stretch property has 11 values: ultra-condensed,
# extra-condensed, condensed, semi-condensed, normal, semi-expanded,
# expanded, extra-expanded, ultra-expanded, wider, and narrower. This
# property is not currently implemented.
#
# The font.size property is the default font size for text, given in pts.
# 12pt is the standard value.
#
font.family : sans-serif
font.style : normal
font.variant : normal
font.weight : normal
font.stretch : normal
# note that font.size controls default text sizes. To configure
# special text sizes tick labels, axes, labels, title, etc, see the rc
# settings for axes and ticks. Special text sizes can be defined
# relative to font.size, using the following values: xx-small, x-small,
# small, medium, large, x-large, xx-large, larger, or smaller
font.size : 12.0
font.serif : DejaVu Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
font.sans-serif: DejaVu Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif
font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive
font.fantasy : Comic Sans MS, Chicago, Charcoal, ImpactWestern, xkcd script, fantasy
font.monospace : DejaVu Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace
### TEXT
# text properties used by text.Text. See
# https://matplotlib.org/api/artist_api.html#module-matplotlib.text for more
# information on text properties
text.color : k
### LaTeX customizations. See http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
text.usetex : False # use latex for all text handling. The following fonts
# are supported through the usual rc parameter settings:
# new century schoolbook, bookman, times, palatino,
# zapf chancery, charter, serif, sans-serif, helvetica,
# avant garde, courier, monospace, computer modern roman,
# computer modern sans serif, computer modern typewriter
# If another font is desired which can loaded using the
# LaTeX \usepackage command, please inquire at the
# matplotlib mailing list
text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES
# AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP
# IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO.
# text.latex.preamble is a single line of LaTeX code that
# will be passed on to the LaTeX system. It may contain
# any code that is valid for the LaTeX "preamble", i.e.
# between the "\documentclass" and "\begin{document}"
# statements.
# Note that it has to be put on a single line, which may
# become quite long.
# The following packages are always loaded with usetex, so
# beware of package collisions: color, geometry, graphicx,
# type1cm, textcomp.
# Adobe Postscript (PSSNFS) font packages may also be
# loaded, depending on your font settings.
text.hinting : auto # May be one of the following:
# 'none': Perform no hinting
# 'auto': Use freetype's autohinter
# 'native': Use the hinting information in the
# font file, if available, and if your
# freetype library supports it
# 'either': Use the native hinting information,
# or the autohinter if none is available.
# For backward compatibility, this value may also be
# True === 'auto' or False === 'none'.
text.hinting_factor : 8 # Specifies the amount of softness for hinting in the
# horizontal direction. A value of 1 will hint to full
# pixels. A value of 2 will hint to half pixels etc.
text.antialiased : True # If True (default), the text will be antialiased.
# This only affects the Agg backend.
# The following settings allow you to select the fonts in math mode.
# They map from a TeX font name to a fontconfig font pattern.
# These settings are only used if mathtext.fontset is 'custom'.
# Note that this "custom" mode is unsupported and may go away in the
# future.
mathtext.cal : cursive
mathtext.rm : serif
mathtext.tt : monospace
mathtext.it : serif:italic
mathtext.bf : serif:bold
mathtext.sf : sans\-serif
mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix',
# 'stixsans' or 'custom'
mathtext.fallback: cm # Select fallback font from ['cm' (Computer Modern), 'stix'
# 'stixsans'] when a symbol cannot be found in one of the
# custom math fonts. Select 'None' to not perform fallback
# and replace the missing character by a dummy.
mathtext.default : it # The default font to use for math.
# Can be any of the LaTeX font names, including
# the special name "regular" for the same font
# used in regular text.
### AXES
# default face and edge color, default tick sizes,
# default fontsizes for ticklabels, and so on. See
# https://matplotlib.org/api/axes_api.html#module-matplotlib.axes
axes.facecolor : w # axes background color
axes.edgecolor : k # axes edge color
axes.linewidth : 1.0 # edge linewidth
axes.grid : False # display grid or not
axes.grid.which : major
axes.grid.axis : both
axes.titlesize : large # fontsize of the axes title
axes.titley : 1.0 # at the top, no autopositioning.
axes.titlepad : 5.0 # pad between axes and title in points
axes.titleweight : normal # font weight for axes title
axes.labelsize : medium # fontsize of the x any y labels
axes.labelpad : 5.0 # space between label and axis
axes.labelweight : normal # weight of the x and y labels
axes.labelcolor : k
axes.axisbelow : False # whether axis gridlines and ticks are below
# the axes elements (lines, text, etc)
axes.formatter.limits : -7, 7 # use scientific notation if log10
# of the axis range is smaller than the
# first or larger than the second
axes.formatter.use_locale : False # When True, format tick labels
# according to the user's locale.
# For example, use ',' as a decimal
# separator in the fr_FR locale.
axes.formatter.use_mathtext : False # When True, use mathtext for scientific
# notation.
axes.formatter.useoffset : True # If True, the tick label formatter
# will default to labeling ticks relative
# to an offset when the data range is very
# small compared to the minimum absolute
# value of the data.
axes.formatter.offset_threshold : 2 # When useoffset is True, the offset
# will be used when it can remove
# at least this number of significant
# digits from tick labels.
axes.unicode_minus : True # use Unicode for the minus symbol
# rather than hyphen. See
# https://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes
axes.prop_cycle : cycler('color', 'bgrcmyk')
# color cycle for plot lines
# as list of string colorspecs:
# single letter, long name, or
# web-style hex
axes.autolimit_mode : round_numbers
axes.xmargin : 0 # x margin. See `axes.Axes.margins`
axes.ymargin : 0 # y margin See `axes.Axes.margins`
axes.spines.bottom : True
axes.spines.left : True
axes.spines.right : True
axes.spines.top : True
polaraxes.grid : True # display grid on polar axes
axes3d.grid : True # display grid on 3d axes
date.autoformatter.year : %Y
date.autoformatter.month : %b %Y
date.autoformatter.day : %b %d %Y
date.autoformatter.hour : %H:%M:%S
date.autoformatter.minute : %H:%M:%S.%f
date.autoformatter.second : %H:%M:%S.%f
date.autoformatter.microsecond : %H:%M:%S.%f
date.converter: auto # 'auto', 'concise'
### TICKS
# see https://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick
xtick.top : True # draw ticks on the top side
xtick.bottom : True # draw ticks on the bottom side
xtick.major.size : 4 # major tick size in points
xtick.minor.size : 2 # minor tick size in points
xtick.minor.visible : False
xtick.major.width : 0.5 # major tick width in points
xtick.minor.width : 0.5 # minor tick width in points
xtick.major.pad : 4 # distance to major tick label in points
xtick.minor.pad : 4 # distance to the minor tick label in points
xtick.color : k # color of the tick labels
xtick.labelsize : medium # fontsize of the tick labels
xtick.direction : in # direction: in, out, or inout
xtick.major.top : True # draw x axis top major ticks
xtick.major.bottom : True # draw x axis bottom major ticks
xtick.minor.top : True # draw x axis top minor ticks
xtick.minor.bottom : True # draw x axis bottom minor ticks
xtick.alignment : center
ytick.left : True # draw ticks on the left side
ytick.right : True # draw ticks on the right side
ytick.major.size : 4 # major tick size in points
ytick.minor.size : 2 # minor tick size in points
ytick.minor.visible : False
ytick.major.width : 0.5 # major tick width in points
ytick.minor.width : 0.5 # minor tick width in points
ytick.major.pad : 4 # distance to major tick label in points
ytick.minor.pad : 4 # distance to the minor tick label in points
ytick.color : k # color of the tick labels
ytick.labelsize : medium # fontsize of the tick labels
ytick.direction : in # direction: in, out, or inout
ytick.major.left : True # draw y axis left major ticks
ytick.major.right : True # draw y axis right major ticks
ytick.minor.left : True # draw y axis left minor ticks
ytick.minor.right : True # draw y axis right minor ticks
ytick.alignment : center
### GRIDS
grid.color : k # grid color
grid.linestyle : : # dotted
grid.linewidth : 0.5 # in points
grid.alpha : 1.0 # transparency, between 0.0 and 1.0
### Legend
legend.fancybox : False # if True, use a rounded box for the
# legend, else a rectangle
legend.loc : upper right
legend.numpoints : 2 # the number of points in the legend line
legend.fontsize : large
legend.borderpad : 0.4 # border whitespace in fontsize units
legend.markerscale : 1.0 # the relative size of legend markers vs. original
# the following dimensions are in axes coords
legend.labelspacing : 0.5 # the vertical space between the legend entries in fraction of fontsize
legend.handlelength : 2. # the length of the legend lines in fraction of fontsize
legend.handleheight : 0.7 # the height of the legend handle in fraction of fontsize
legend.handletextpad : 0.8 # the space between the legend line and legend text in fraction of fontsize
legend.borderaxespad : 0.5 # the border between the axes and legend edge in fraction of fontsize
legend.columnspacing : 2. # the border between the axes and legend edge in fraction of fontsize
legend.shadow : False
legend.frameon : True # whether or not to draw a frame around legend
legend.framealpha : None # opacity of legend frame
legend.scatterpoints : 3 # number of scatter points
legend.facecolor : inherit # legend background color (when 'inherit' uses axes.facecolor)
legend.edgecolor : inherit # legend edge color (when 'inherit' uses axes.edgecolor)
### FIGURE
# See https://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure
figure.titlesize : medium # size of the figure title
figure.titleweight : normal # weight of the figure title
figure.labelsize: medium # size of the figure label
figure.labelweight: normal # weight of the figure label
figure.figsize : 8, 6 # figure size in inches
figure.dpi : 80 # figure dots per inch
figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray
figure.edgecolor : w # figure edgecolor
figure.autolayout : False # When True, automatically adjust subplot
# parameters to make the plot fit the figure
figure.frameon : True
# The figure subplot parameters. All dimensions are a fraction of the
# figure width or height
figure.subplot.left : 0.125 # the left side of the subplots of the figure
figure.subplot.right : 0.9 # the right side of the subplots of the figure
figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure
figure.subplot.top : 0.9 # the top of the subplots of the figure
figure.subplot.wspace : 0.2 # the amount of width reserved for space between subplots,
# expressed as a fraction of the average axis width
figure.subplot.hspace : 0.2 # the amount of height reserved for space between subplots,
# expressed as a fraction of the average axis height
### IMAGES
image.aspect : equal # equal | auto | a number
image.interpolation : bilinear # see help(imshow) for options
image.cmap : jet # gray | jet | ...
image.lut : 256 # the size of the colormap lookup table
image.origin : upper # lower | upper
image.resample : False
image.composite_image : True
### CONTOUR PLOTS
contour.negative_linestyle : dashed # dashed | solid
contour.corner_mask : True
# errorbar props
errorbar.capsize: 3
# scatter props
scatter.marker: o
### Boxplots
boxplot.bootstrap: None
boxplot.boxprops.color: b
boxplot.boxprops.linestyle: -
boxplot.boxprops.linewidth: 1.0
boxplot.capprops.color: k
boxplot.capprops.linestyle: -
boxplot.capprops.linewidth: 1.0
boxplot.flierprops.color: b
boxplot.flierprops.linestyle: none
boxplot.flierprops.linewidth: 1.0
boxplot.flierprops.marker: +
boxplot.flierprops.markeredgecolor: k
boxplot.flierprops.markerfacecolor: auto
boxplot.flierprops.markersize: 6.0
boxplot.meanline: False
boxplot.meanprops.color: r
boxplot.meanprops.linestyle: -
boxplot.meanprops.linewidth: 1.0
boxplot.medianprops.color: r
boxplot.meanprops.marker: s
boxplot.meanprops.markerfacecolor: r
boxplot.meanprops.markeredgecolor: k
boxplot.meanprops.markersize: 6.0
boxplot.medianprops.linestyle: -
boxplot.medianprops.linewidth: 1.0
boxplot.notch: False
boxplot.patchartist: False
boxplot.showbox: True
boxplot.showcaps: True
boxplot.showfliers: True
boxplot.showmeans: False
boxplot.vertical: True
boxplot.whiskerprops.color: b
boxplot.whiskerprops.linestyle: --
boxplot.whiskerprops.linewidth: 1.0
boxplot.whiskers: 1.5
### Agg rendering
### Warning: experimental, 2008/10/10
agg.path.chunksize : 0 # 0 to disable; values in the range
# 10000 to 100000 can improve speed slightly
# and prevent an Agg rendering failure
# when plotting very large data sets,
# especially if they are very gappy.
# It may cause minor artifacts, though.
# A value of 20000 is probably a good
# starting point.
### SAVING FIGURES
path.simplify : True # When True, simplify paths by removing "invisible"
# points to reduce file size and increase rendering
# speed
path.simplify_threshold : 0.1111111111111111
# The threshold of similarity below which
# vertices will be removed in the simplification
# process
path.snap : True # When True, rectilinear axis-aligned paths will be snapped to
# the nearest pixel when certain criteria are met. When False,
# paths will never be snapped.
path.sketch : None # May be none, or a 3-tuple of the form (scale, length,
# randomness).
# *scale* is the amplitude of the wiggle
# perpendicular to the line (in pixels). *length*
# is the length of the wiggle along the line (in
# pixels). *randomness* is the factor by which
# the length is randomly scaled.
# the default savefig params can be different from the display params
# e.g., you may want a higher resolution, or to make the figure
# background white
savefig.dpi : 100 # figure dots per inch
savefig.facecolor : w # figure facecolor when saving
savefig.edgecolor : w # figure edgecolor when saving
savefig.format : png # png, ps, pdf, svg
savefig.bbox : standard # 'tight' or 'standard'.
# 'tight' is incompatible with pipe-based animation
# backends (e.g. 'ffmpeg') but will work with those
# based on temporary files (e.g. 'ffmpeg_file')
savefig.pad_inches : 0.1 # Padding to be used when bbox is set to 'tight'
savefig.transparent : False # setting that controls whether figures are saved with a
# transparent background by default
savefig.orientation : portrait
# ps backend params
ps.papersize : letter # auto, letter, legal, ledger, A0-A10, B0-B10
ps.useafm : False # use of afm fonts, results in small files
ps.usedistiller : False # can be: None, ghostscript or xpdf
# Experimental: may produce smaller files.
# xpdf intended for production of publication quality files,
# but requires ghostscript, xpdf and ps2eps
ps.distiller.res : 6000 # dpi
ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType)
# pdf backend params
pdf.compression : 6 # integer from 0 to 9
# 0 disables compression (good for debugging)
pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType)
pdf.inheritcolor : False
pdf.use14corefonts : False
# pgf backend params
pgf.texsystem : xelatex
pgf.rcfonts : True
pgf.preamble :
# svg backend params
svg.image_inline : True # write raster image data directly into the svg file
svg.fonttype : path # How to handle SVG fonts:
# 'none': Assume fonts are installed on the machine where the SVG will be viewed.
# 'path': Embed characters as paths -- supported by most SVG renderers
# Event keys to interact with figures/plots via keyboard.
# Customize these settings according to your needs.
# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '')
keymap.fullscreen : f, ctrl+f # toggling
keymap.home : h, r, home # home or reset mnemonic
keymap.back : left, c, backspace # forward / backward keys to enable
keymap.forward : right, v # left handed quick navigation
keymap.pan : p # pan mnemonic
keymap.zoom : o # zoom mnemonic
keymap.save : s, ctrl+s # saving current figure
keymap.quit : ctrl+w, cmd+w # close the current figure
keymap.grid : g # switching on/off a grid in current axes
keymap.yscale : l # toggle scaling of y-axes ('log'/'linear')
keymap.xscale : k, L # toggle scaling of x-axes ('log'/'linear')
###ANIMATION settings
animation.writer : ffmpeg # MovieWriter 'backend' to use
animation.codec : mpeg4 # Codec to use for writing movie
animation.bitrate: -1 # Controls size/quality tradeoff for movie.
# -1 implies let utility auto-determine
animation.frame_format: png # Controls frame format used by temp files
animation.ffmpeg_path: ffmpeg # Path to ffmpeg binary. Without full path
# $PATH is searched
animation.ffmpeg_args: # Additional arguments to pass to ffmpeg
animation.convert_path: convert # Path to ImageMagick's convert binary.
# On Windows use the full path since convert
# is also the name of a system tool.
animation.convert_args:
animation.html: none
_internal.classic_mode: True

View File

@@ -0,0 +1,29 @@
# Set black background default line colors to white.
lines.color: white
patch.edgecolor: white
text.color: white
axes.facecolor: black
axes.edgecolor: white
axes.labelcolor: white
axes.prop_cycle: cycler('color', ['8dd3c7', 'feffb3', 'bfbbd9', 'fa8174', '81b1d2', 'fdb462', 'b3de69', 'bc82bd', 'ccebc4', 'ffed6f'])
xtick.color: white
ytick.color: white
grid.color: white
figure.facecolor: black
figure.edgecolor: black
savefig.facecolor: black
savefig.edgecolor: black
### Boxplots
boxplot.boxprops.color: white
boxplot.capprops.color: white
boxplot.flierprops.color: white
boxplot.flierprops.markeredgecolor: white
boxplot.whiskerprops.color: white

View File

@@ -0,0 +1,11 @@
# a small set of changes that will make your plotting FAST (1).
#
# (1) in some cases
# Maximally simplify lines.
path.simplify: True
path.simplify_threshold: 1.0
# chunk up large lines into smaller lines!
# simple trick to avoid those pesky O(>n) algorithms!
agg.path.chunksize: 10000

View File

@@ -0,0 +1,40 @@
#Author: Cameron Davidson-Pilon, replicated styles from FiveThirtyEight.com
# See https://www.dataorigami.net/blogs/fivethirtyeight-mpl
lines.linewidth: 4
lines.solid_capstyle: butt
legend.fancybox: true
axes.prop_cycle: cycler('color', ['008fd5', 'fc4f30', 'e5ae38', '6d904f', '8b8b8b', '810f7c'])
axes.facecolor: f0f0f0
axes.labelsize: large
axes.axisbelow: true
axes.grid: true
axes.edgecolor: f0f0f0
axes.linewidth: 3.0
axes.titlesize: x-large
patch.edgecolor: f0f0f0
patch.linewidth: 0.5
svg.fonttype: path
grid.linestyle: -
grid.linewidth: 1.0
grid.color: cbcbcb
xtick.major.size: 0
xtick.minor.size: 0
ytick.major.size: 0
ytick.minor.size: 0
font.size:14.0
savefig.edgecolor: f0f0f0
savefig.facecolor: f0f0f0
figure.subplot.left: 0.08
figure.subplot.right: 0.95
figure.subplot.bottom: 0.07
figure.facecolor: f0f0f0

View File

@@ -0,0 +1,39 @@
# from https://everyhue.me/posts/sane-color-scheme-for-matplotlib/
patch.linewidth: 0.5
patch.facecolor: 348ABD # blue
patch.edgecolor: EEEEEE
patch.antialiased: True
font.size: 10.0
axes.facecolor: E5E5E5
axes.edgecolor: white
axes.linewidth: 1
axes.grid: True
axes.titlesize: x-large
axes.labelsize: large
axes.labelcolor: 555555
axes.axisbelow: True # grid/ticks are below elements (e.g., lines, text)
axes.prop_cycle: cycler('color', ['E24A33', '348ABD', '988ED5', '777777', 'FBC15E', '8EBA42', 'FFB5B8'])
# E24A33 : red
# 348ABD : blue
# 988ED5 : purple
# 777777 : gray
# FBC15E : yellow
# 8EBA42 : green
# FFB5B8 : pink
xtick.color: 555555
xtick.direction: out
ytick.color: 555555
ytick.direction: out
grid.color: white
grid.linestyle: - # solid line
figure.facecolor: white
figure.edgecolor: 0.50

View File

@@ -0,0 +1,29 @@
# Set all colors to grayscale
# Note: strings of float values are interpreted by matplotlib as gray values.
lines.color: black
patch.facecolor: gray
patch.edgecolor: black
text.color: black
axes.facecolor: white
axes.edgecolor: black
axes.labelcolor: black
# black to light gray
axes.prop_cycle: cycler('color', ['0.00', '0.40', '0.60', '0.70'])
xtick.color: black
ytick.color: black
grid.color: black
figure.facecolor: 0.75
figure.edgecolor: white
image.cmap: gray
savefig.facecolor: white
savefig.edgecolor: white

View File

@@ -0,0 +1,3 @@
# Seaborn bright palette
axes.prop_cycle: cycler('color', ['003FFF', '03ED3A', 'E8000B', '8A2BE2', 'FFC400', '00D7FF'])
patch.facecolor: 003FFF

View File

@@ -0,0 +1,3 @@
# Seaborn colorblind palette
axes.prop_cycle: cycler('color', ['0072B2', '009E73', 'D55E00', 'CC79A7', 'F0E442', '56B4E9'])
patch.facecolor: 0072B2

View File

@@ -0,0 +1,3 @@
# Seaborn dark palette
axes.prop_cycle: cycler('color', ['001C7F', '017517', '8C0900', '7600A1', 'B8860B', '006374'])
patch.facecolor: 001C7F

View File

@@ -0,0 +1,30 @@
# Seaborn common parameters
# .15 = dark_gray
# .8 = light_gray
figure.facecolor: white
text.color: .15
axes.labelcolor: .15
legend.frameon: False
legend.numpoints: 1
legend.scatterpoints: 1
xtick.direction: out
ytick.direction: out
xtick.color: .15
ytick.color: .15
axes.axisbelow: True
image.cmap: Greys
font.family: sans-serif
font.sans-serif: Arial, Liberation Sans, DejaVu Sans, Bitstream Vera Sans, sans-serif
grid.linestyle: -
lines.solid_capstyle: round
# Seaborn dark parameters
axes.grid: False
axes.facecolor: EAEAF2
axes.edgecolor: white
axes.linewidth: 0
grid.color: white
xtick.major.size: 0
ytick.major.size: 0
xtick.minor.size: 0
ytick.minor.size: 0

View File

@@ -0,0 +1,30 @@
# Seaborn common parameters
# .15 = dark_gray
# .8 = light_gray
figure.facecolor: white
text.color: .15
axes.labelcolor: .15
legend.frameon: False
legend.numpoints: 1
legend.scatterpoints: 1
xtick.direction: out
ytick.direction: out
xtick.color: .15
ytick.color: .15
axes.axisbelow: True
image.cmap: Greys
font.family: sans-serif
font.sans-serif: Arial, Liberation Sans, DejaVu Sans, Bitstream Vera Sans, sans-serif
grid.linestyle: -
lines.solid_capstyle: round
# Seaborn darkgrid parameters
axes.grid: True
axes.facecolor: EAEAF2
axes.edgecolor: white
axes.linewidth: 0
grid.color: white
xtick.major.size: 0
ytick.major.size: 0
xtick.minor.size: 0
ytick.minor.size: 0

View File

@@ -0,0 +1,3 @@
# Seaborn deep palette
axes.prop_cycle: cycler('color', ['4C72B0', '55A868', 'C44E52', '8172B2', 'CCB974', '64B5CD'])
patch.facecolor: 4C72B0

View File

@@ -0,0 +1,3 @@
# Seaborn muted palette
axes.prop_cycle: cycler('color', ['4878CF', '6ACC65', 'D65F5F', 'B47CC7', 'C4AD66', '77BEDB'])
patch.facecolor: 4878CF

View File

@@ -0,0 +1,21 @@
# Seaborn notebook context
figure.figsize: 8.0, 5.5
axes.labelsize: 11
axes.titlesize: 12
xtick.labelsize: 10
ytick.labelsize: 10
legend.fontsize: 10
grid.linewidth: 1
lines.linewidth: 1.75
patch.linewidth: .3
lines.markersize: 7
lines.markeredgewidth: 0
xtick.major.width: 1
ytick.major.width: 1
xtick.minor.width: .5
ytick.minor.width: .5
xtick.major.pad: 7
ytick.major.pad: 7

View File

@@ -0,0 +1,21 @@
# Seaborn paper context
figure.figsize: 6.4, 4.4
axes.labelsize: 8.8
axes.titlesize: 9.6
xtick.labelsize: 8
ytick.labelsize: 8
legend.fontsize: 8
grid.linewidth: 0.8
lines.linewidth: 1.4
patch.linewidth: 0.24
lines.markersize: 5.6
lines.markeredgewidth: 0
xtick.major.width: 0.8
ytick.major.width: 0.8
xtick.minor.width: 0.4
ytick.minor.width: 0.4
xtick.major.pad: 5.6
ytick.major.pad: 5.6

View File

@@ -0,0 +1,3 @@
# Seaborn pastel palette
axes.prop_cycle: cycler('color', ['92C6FF', '97F0AA', 'FF9F9A', 'D0BBFF', 'FFFEA3', 'B0E0E6'])
patch.facecolor: 92C6FF

View File

@@ -0,0 +1,21 @@
# Seaborn poster context
figure.figsize: 12.8, 8.8
axes.labelsize: 17.6
axes.titlesize: 19.2
xtick.labelsize: 16
ytick.labelsize: 16
legend.fontsize: 16
grid.linewidth: 1.6
lines.linewidth: 2.8
patch.linewidth: 0.48
lines.markersize: 11.2
lines.markeredgewidth: 0
xtick.major.width: 1.6
ytick.major.width: 1.6
xtick.minor.width: 0.8
ytick.minor.width: 0.8
xtick.major.pad: 11.2
ytick.major.pad: 11.2

View File

@@ -0,0 +1,21 @@
# Seaborn talk context
figure.figsize: 10.4, 7.15
axes.labelsize: 14.3
axes.titlesize: 15.6
xtick.labelsize: 13
ytick.labelsize: 13
legend.fontsize: 13
grid.linewidth: 1.3
lines.linewidth: 2.275
patch.linewidth: 0.39
lines.markersize: 9.1
lines.markeredgewidth: 0
xtick.major.width: 1.3
ytick.major.width: 1.3
xtick.minor.width: 0.65
ytick.minor.width: 0.65
xtick.major.pad: 9.1
ytick.major.pad: 9.1

View File

@@ -0,0 +1,30 @@
# Seaborn common parameters
# .15 = dark_gray
# .8 = light_gray
figure.facecolor: white
text.color: .15
axes.labelcolor: .15
legend.frameon: False
legend.numpoints: 1
legend.scatterpoints: 1
xtick.direction: out
ytick.direction: out
xtick.color: .15
ytick.color: .15
axes.axisbelow: True
image.cmap: Greys
font.family: sans-serif
font.sans-serif: Arial, Liberation Sans, DejaVu Sans, Bitstream Vera Sans, sans-serif
grid.linestyle: -
lines.solid_capstyle: round
# Seaborn white parameters
axes.grid: False
axes.facecolor: white
axes.edgecolor: .15
axes.linewidth: 1.25
grid.color: .8
xtick.major.size: 6
ytick.major.size: 6
xtick.minor.size: 3
ytick.minor.size: 3

View File

@@ -0,0 +1,30 @@
# Seaborn common parameters
# .15 = dark_gray
# .8 = light_gray
figure.facecolor: white
text.color: .15
axes.labelcolor: .15
legend.frameon: False
legend.numpoints: 1
legend.scatterpoints: 1
xtick.direction: out
ytick.direction: out
xtick.color: .15
ytick.color: .15
axes.axisbelow: True
image.cmap: Greys
font.family: sans-serif
font.sans-serif: Arial, Liberation Sans, DejaVu Sans, Bitstream Vera Sans, sans-serif
grid.linestyle: -
lines.solid_capstyle: round
# Seaborn white parameters
axes.grid: False
axes.facecolor: white
axes.edgecolor: .15
axes.linewidth: 1.25
grid.color: .8
xtick.major.size: 0
ytick.major.size: 0
xtick.minor.size: 0
ytick.minor.size: 0

View File

@@ -0,0 +1,30 @@
# Seaborn common parameters
# .15 = dark_gray
# .8 = light_gray
figure.facecolor: white
text.color: .15
axes.labelcolor: .15
legend.frameon: False
legend.numpoints: 1
legend.scatterpoints: 1
xtick.direction: out
ytick.direction: out
xtick.color: .15
ytick.color: .15
axes.axisbelow: True
image.cmap: Greys
font.family: sans-serif
font.sans-serif: Arial, Liberation Sans, DejaVu Sans, Bitstream Vera Sans, sans-serif
grid.linestyle: -
lines.solid_capstyle: round
# Seaborn whitegrid parameters
axes.grid: True
axes.facecolor: white
axes.edgecolor: .8
axes.linewidth: 1
grid.color: .8
xtick.major.size: 0
ytick.major.size: 0
xtick.minor.size: 0
ytick.minor.size: 0

View File

@@ -0,0 +1,57 @@
# default seaborn aesthetic
# darkgrid + deep palette + notebook context
axes.axisbelow: True
axes.edgecolor: white
axes.facecolor: EAEAF2
axes.grid: True
axes.labelcolor: .15
axes.labelsize: 11
axes.linewidth: 0
axes.prop_cycle: cycler('color', ['4C72B0', '55A868', 'C44E52', '8172B2', 'CCB974', '64B5CD'])
axes.titlesize: 12
figure.facecolor: white
figure.figsize: 8.0, 5.5
font.family: sans-serif
font.sans-serif: Arial, Liberation Sans, DejaVu Sans, Bitstream Vera Sans, sans-serif
grid.color: white
grid.linestyle: -
grid.linewidth: 1
image.cmap: Greys
legend.fontsize: 10
legend.frameon: False
legend.numpoints: 1
legend.scatterpoints: 1
lines.linewidth: 1.75
lines.markeredgewidth: 0
lines.markersize: 7
lines.solid_capstyle: round
patch.facecolor: 4C72B0
patch.linewidth: .3
text.color: .15
xtick.color: .15
xtick.direction: out
xtick.labelsize: 10
xtick.major.pad: 7
xtick.major.size: 0
xtick.major.width: 1
xtick.minor.size: 0
xtick.minor.width: .5
ytick.color: .15
ytick.direction: out
ytick.labelsize: 10
ytick.major.pad: 7
ytick.major.size: 0
ytick.major.width: 1
ytick.minor.size: 0
ytick.minor.width: .5

View File

@@ -0,0 +1,3 @@
# Tableau colorblind 10 palette
axes.prop_cycle: cycler('color', ['006BA4', 'FF800E', 'ABABAB', '595959', '5F9ED1', 'C85200', '898989', 'A2C8EC', 'FFBC79', 'CFCFCF'])
patch.facecolor: 006BA4