python - matplotlib candlestick bars/boxes/width/spacing -


I am using matplotlib to attract maplibic charts.

[Q] The default setting that should run through the High-open-close box, the open box should be "top" for me, so that I can only see high-max (open, closed) And can be seen as a minimum (open, closed) -line, is it possible?

I answered my question and posting my question with the original question if it helps someone else.

The only way to do this is to rewrite candletsick () instead of one, to draw two rows, I have some sample code that I am using. Always be happy to hear better ways to do the same thing. def fooCandlestick (ax, quote, width = 0.5, colored = 'a' '' colordown = 'r', alpha = 1.0): OFFSET = width / 2.0 line = [] box = [] In quote q: t, op, cl, hi, lo = q [: 5] box_h = maximum (op, cl) box_l = min (op), cl) height = box_h - box_l if cac: = op : Color = colorup else: color = colordown vline_lo = line 2d (xdata = (t, t), ydata = (lo, box_l), color = 'k', linewidth = 0.5, antialiase = true,) vline_en = line2d ( Xdata = (t, t), ydata = (box_h, hi), color = 'k', linewidth = 0.5, antialize = true,) rect = rectangle (xy = (t -OFFSET, box_l), width = width, height = Height, facecolor = color, e Dgecolor = color) rect.set_alpha (alpha) lines .append (vline_lo) lines.append (vline_en) box.append (rect) ax.add_line (Vline_lo) ax.add_line (vline_hi) ax.add_patch (rect) ax.autoscale_view ( ) Return line, box

[Q] What matplotlib support candle width and even the spacing between each candlestick setting?

Thank you.

I'm not sure about vacancy, but:

  • you You can set the transparency of the box by using alpha kwarg to candlestick . 1 should be opaque.
  • You can define the width using the width keywords, not sure what the units are, just play with them.

    For example:

      lamp (ax, quote, width = 0.5, alpha = 1.0)   

    Ah, the answer is to raise the difference in the inter-candlestick difference between the middle of a hack and say:

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -