我如今是用剛剛安裝好的Open Live Writer, 爲本身的博客園撰寫博文. 剛纔測試發佈了一篇. 不知怎麼搞得, 發佈成了日記. python
博客園裏的日記, 文章和隨筆是不一樣的分類. 隨筆就是一般說的博文. 日記在博文裏看不到的 . app
關閉/退出軟件後, 再次啓動, 再發布一篇試一試. 測試
奧! 此次能夠看到博文了. 那就是說能夠發佈博文到博客園了.spa
- 點擊 Insert菜單/Picture圖標/from your computer選項orm
- 彈出窗口: 選擇圖片文件blog
這是引用塊. 對嗎? 用雙引號圍起來的文本. 或者套用段落裏的雙引號格式的文本塊.
```python圖片
def _candlestick(ax, quotes, width=0.2, colorup='r', colordown='k',
alpha=1.0, ochl=True):
"""
Plot the time, open, high, low, close as a vertical line ranging
from low to high. Use a rectangular bar to represent the
open-close span. If close >= open, use colorup to color the bar,
otherwise use colordownget
Parameters
----------
ax : `Axes`
an Axes instance to plot to
quotes : sequence of quote sequences
data to plot. time must be in float date format - see date2num
(time, open, high, low, close, ...) vs
(time, open, close, high, low, ...)
set by `ochl`
width : float
fraction of a day for the rectangle width
colorup : color
the color of the rectangle where close >= open
colordown : color
the color of the rectangle where close < open
alpha : float
the rectangle alpha level
ochl: bool
argument to select between ochl and ohlc ordering of quotes博客
Returns
-------
ret : tuple
returns (lines, patches) where lines is a list of lines
added and patches is a list of the rectangle patches addedit
"""
OFFSET = width / 2.0
lines = []
patches = []
for q in quotes:
if ochl:
t, open, close, high, low = q[:5]
else:
t, open, high, low, close = q[:5]
if close >= open:
color = colorup
lower = open
height = close - open
else:
color = colordown; type(color)
lower = close
height = open - close
if close>=open:
vline1 = plt.Line2D(
xdata=(t, t), ydata=(low, open) ,
color='k', #color,
linewidth=0.5,
antialiased=True,
)
ax.add_line(vline1)
lines.append(vline1)
vline2 = plt.Line2D(
xdata=(t, t), ydata=(close, high) ,
color='k', #color,
linewidth=0.5,
antialiased=True,
)
ax.add_line(vline2)
lines.append(vline2)
else:
vline3 = plt.Line2D(
xdata=(t, t), ydata=(low, high) ,
color='k', #color,
linewidth=0.5,
antialiased=True,
)
ax.add_line(vline3)
lines.append(vline3)
rect = plt.Rectangle(
xy=(t - OFFSET, lower),
width=width,
height=height,
facecolor='w' if close>open else 'k', #color,
edgecolor='k', #color,
linewidth=0.5,
)
rect.set_alpha(alpha)
ax.add_patch(rect)
patches.append(rect)
ax.autoscale_view()
return lines, patches
```