Skip to content

Commit 65c0c1f

Browse files
tweak default line widths
1 parent b1df20e commit 65c0c1f

File tree

5 files changed

+23
-55
lines changed

5 files changed

+23
-55
lines changed

examples/scratch_pad/panels_ylim_width_alpha.ipynb

Lines changed: 21 additions & 53 deletions
Large diffs are not rendered by default.

src/mplfinance/_widths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def _get_widths_df():
1616
candle_linewidth = (1.00, 0.875, 0.75, 0.625, 0.500, 0.438, 0.435, 0.435)
1717
ohlc_tickwidth = tuple([0.35]*8)
1818
ohlc_linewidth = (1.50, 1.175, 0.85, 0.525, 0.525, 0.525, 0.525, 0.525)
19-
line_width = (2.00, 1.600, 1.15, 0.720, 0.715, 0.710, 0.705, 0.700)
19+
line_width = (2.25, 1.8, 1.3, 0.813, 0.807, 0.801, 0.796, 0.791)
2020
widths = {}
2121
widths['vw'] = volume_width
2222
widths['vlw'] = volume_linewidth

src/mplfinance/plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ def plot( data, **kwargs ):
564564
elif aptype == 'line':
565565
ls = apdict['linestyle']
566566
color = apdict['color']
567-
width = apdict['width']
567+
width = apdict['width'] if apdict['width'] is not None else 1.6*config['_width_config']['line_width']
568568
alpha = apdict['alpha']
569569
ax.plot(xdates,ydata,linestyle=ls,color=color,linewidth=width,alpha=alpha)
570570
else:

tests/reference_images/addplot06.png

-1.12 KB
Loading

tests/reference_images/addplot08.png

-773 Bytes
Loading

0 commit comments

Comments
 (0)