Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Controlling Indicator line width #1038

Rydo111 started this conversation in Ideas
Discussion options

Hi @kernc ; I love your work on this module; using it a lot lately. I have come across the need to control line width for each Indicator. I couldn't work out how to do it natively, so I tinkered with the code and it seems to work.

  • added the line_width=None property to the def I() function
  • added to the def _plot_indicators() function (under the colors instrcutions):
    line_widths = value._opts['line_width']
    if line_widths is None:
    line_widths = [2] * max(len(value._opts['color']), 1)
    line_widths = cycle(_as_list(line_widths))

...then added to the for loop (again, under the color instruction):
line_width = next(line_widths)
...then added line_width=line_width to the fig.line function.

Not sure whether this is a dumb idea or not, but it seems to work. I can now control the line thickness of each of my plots. Just thought I'd share.

Regards,

Rydo

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /