seolpyo-mplchart 0.0.6__tar.gz → 0.0.31__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of seolpyo-mplchart might be problematic. Click here for more details.
- {seolpyo_mplchart-0.0.6/seolpyo_mplchart.egg-info → seolpyo_mplchart-0.0.31}/PKG-INFO +6 -10
- seolpyo_mplchart-0.0.31/README.md +16 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/pyproject.toml +6 -6
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart/cursor.py +28 -36
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart/draw.py +9 -9
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart/slider.py +48 -46
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31/seolpyo_mplchart.egg-info}/PKG-INFO +6 -10
- seolpyo_mplchart-0.0.31/seolpyo_mplchart.egg-info/requires.txt +2 -0
- seolpyo_mplchart-0.0.6/README.md +0 -20
- seolpyo_mplchart-0.0.6/seolpyo_mplchart.egg-info/requires.txt +0 -2
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/MANIFEST.in +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart/__init__.py +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart/base.py +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart/data/apple.txt +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart/data/samsung.txt +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart/test.py +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart/utils.py +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart.egg-info/SOURCES.txt +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart.egg-info/dependency_links.txt +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart.egg-info/top_level.txt +0 -0
- {seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/setup.cfg +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: seolpyo-mplchart
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary: Fast candlestick chart using Python.
|
|
3
|
+
Version: 0.0.31
|
|
4
|
+
Summary: Fast candlestick chart using Python.
|
|
5
5
|
Author-email: white-seolpyo <white-seolpyo@naver.com>
|
|
6
6
|
License: MIT License
|
|
7
7
|
Project-URL: Homepage, https://white.seolpyo.com/
|
|
@@ -22,8 +22,8 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
23
|
Requires-Python: >=3.11
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
|
-
Requires-Dist: matplotlib>=3.
|
|
26
|
-
Requires-Dist: pandas>=2.
|
|
25
|
+
Requires-Dist: matplotlib>=3.9.2
|
|
26
|
+
Requires-Dist: pandas>=2.2.2
|
|
27
27
|
|
|
28
28
|
# Donation
|
|
29
29
|
Bitcoin: 1MKCHW8smDZv5DFMiVkA5G3DeXcMn871ZX
|
|
@@ -38,10 +38,6 @@ Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
# Sample
|
|
41
|
-

|
|
42
42
|
|
|
43
|
-

|
|
46
|
-
|
|
47
|
-

|
|
43
|
+

|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Donation
|
|
2
|
+
Bitcoin: 1MKCHW8smDZv5DFMiVkA5G3DeXcMn871ZX
|
|
3
|
+
|
|
4
|
+
Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Document
|
|
8
|
+
[English](https://white.seolpyo.com/entry/148/)
|
|
9
|
+
|
|
10
|
+
[한글](https://white.seolpyo.com/entry/147/)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# Sample
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+

|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
requires = [
|
|
3
3
|
"setuptools >= 65.0",
|
|
4
|
-
"matplotlib >= 3.
|
|
5
|
-
"pandas >= 2.
|
|
4
|
+
"matplotlib >= 3.9.2",
|
|
5
|
+
"pandas >= 2.2.2",
|
|
6
6
|
]
|
|
7
7
|
build-backend = "setuptools.build_meta"
|
|
8
8
|
|
|
9
9
|
[project]
|
|
10
10
|
name = "seolpyo-mplchart"
|
|
11
|
-
version = "0.0.
|
|
11
|
+
version = "0.0.31"
|
|
12
12
|
dependencies = [
|
|
13
|
-
"matplotlib >= 3.
|
|
14
|
-
"pandas >= 2.
|
|
13
|
+
"matplotlib >= 3.9.2",
|
|
14
|
+
"pandas >= 2.2.2",
|
|
15
15
|
]
|
|
16
16
|
license = {text = "MIT License"}
|
|
17
|
-
description = "Fast candlestick chart using Python
|
|
17
|
+
description = "Fast candlestick chart using Python.\nIncludes navigator, slider, navigation, and text information display functions"
|
|
18
18
|
readme = "README.md"
|
|
19
19
|
requires-python = ">= 3.11"
|
|
20
20
|
authors = [
|
|
@@ -79,34 +79,6 @@ class DataMixin(CollectionMixin):
|
|
|
79
79
|
df['rate_volume'] = ((df[self.volume] - df[self.volume].shift(1)) / df[self.volume].shift(1) * 100).__round__(2).fillna(0)
|
|
80
80
|
return
|
|
81
81
|
|
|
82
|
-
def set_text_coordante(self, vmin, vmax, pmin, pmax, volmax):
|
|
83
|
-
# 주가, 거래량 텍스트 x 위치
|
|
84
|
-
x_distance = (vmax - vmin) / 30
|
|
85
|
-
self.v0, self.v1 = (vmin + x_distance, vmax - x_distance)
|
|
86
|
-
self.text_price.set_x(self.v0)
|
|
87
|
-
self.text_volume.set_x(self.v0)
|
|
88
|
-
|
|
89
|
-
self.vmin, self.vmax = (vmin, vmax)
|
|
90
|
-
self.vmiddle = vmax - int((vmax - vmin) / 2)
|
|
91
|
-
|
|
92
|
-
psub = pmax - pmin
|
|
93
|
-
self.min_psub = psub / 12
|
|
94
|
-
|
|
95
|
-
# 주가 날짜 텍스트 y 위치
|
|
96
|
-
y = (psub) / 20 + pmin
|
|
97
|
-
self.text_date_price.set_y(y)
|
|
98
|
-
# 주가 정보 y 위치
|
|
99
|
-
y = pmax - (psub) / 20
|
|
100
|
-
self.text_price_info.set_y(y)
|
|
101
|
-
|
|
102
|
-
# 거래량 날짜 텍스트 y 위치
|
|
103
|
-
y = volmax * 0.85
|
|
104
|
-
self.text_date_volume.set_y(y)
|
|
105
|
-
# 거래량 정보 y 위치
|
|
106
|
-
self.text_volume_info.set_y(y)
|
|
107
|
-
|
|
108
|
-
return
|
|
109
|
-
|
|
110
82
|
|
|
111
83
|
class LineMixin(DataMixin):
|
|
112
84
|
in_slider, in_price, in_volume = (False, False, False)
|
|
@@ -200,12 +172,8 @@ class LineMixin(DataMixin):
|
|
|
200
172
|
if self.in_index:
|
|
201
173
|
intx = self.intx
|
|
202
174
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
sub = (h - l) / 2
|
|
206
|
-
if sub < self.min_psub: sub = self.min_psub
|
|
207
|
-
high = h + sub
|
|
208
|
-
low = l - sub
|
|
175
|
+
high = self.df[self.high][intx] * 1.02
|
|
176
|
+
low = self.df[self.low][intx] * 0.98
|
|
209
177
|
if high < y or y < low: self._in_candle = False
|
|
210
178
|
else:
|
|
211
179
|
self._in_candle = True
|
|
@@ -259,6 +227,31 @@ class InfoMixin(LineMixin):
|
|
|
259
227
|
|
|
260
228
|
return
|
|
261
229
|
|
|
230
|
+
def set_text_coordante(self, vmin, vmax, pmin, pmax, volmax):
|
|
231
|
+
# 주가, 거래량 텍스트 x 위치
|
|
232
|
+
x_distance = (vmax - vmin) / 30
|
|
233
|
+
self.v0, self.v1 = (vmin + x_distance, vmax - x_distance)
|
|
234
|
+
self.text_price.set_x(self.v0)
|
|
235
|
+
self.text_volume.set_x(self.v0)
|
|
236
|
+
|
|
237
|
+
self.vmin, self.vmax = (vmin, vmax)
|
|
238
|
+
self.vmiddle = vmax - int((vmax - vmin) / 2)
|
|
239
|
+
|
|
240
|
+
# 주가 날짜 텍스트 y 위치
|
|
241
|
+
y = (pmax - pmin) / 20 + pmin
|
|
242
|
+
self.text_date_price.set_y(y)
|
|
243
|
+
# 주가 정보 y 위치
|
|
244
|
+
y = pmax - (pmax - pmin) / 20
|
|
245
|
+
self.text_price_info.set_y(y)
|
|
246
|
+
|
|
247
|
+
# 거래량 날짜 텍스트 y 위치
|
|
248
|
+
y = volmax * 0.85
|
|
249
|
+
self.text_date_volume.set_y(y)
|
|
250
|
+
# 거래량 정보 y 위치
|
|
251
|
+
self.text_volume_info.set_y(y)
|
|
252
|
+
|
|
253
|
+
return
|
|
254
|
+
|
|
262
255
|
def _slider_move_action(self, e):
|
|
263
256
|
super()._slider_move_action(e)
|
|
264
257
|
|
|
@@ -431,8 +424,7 @@ if __name__ == '__main__':
|
|
|
431
424
|
file = Path(__file__).parent / 'data/apple.txt'
|
|
432
425
|
with open(file, 'r', encoding='utf-8') as txt:
|
|
433
426
|
data = json.load(txt)
|
|
434
|
-
|
|
435
|
-
data = data[n:n+100]
|
|
427
|
+
data = data[:100]
|
|
436
428
|
df = pd.DataFrame(data)
|
|
437
429
|
|
|
438
430
|
t = time()
|
|
@@ -54,7 +54,7 @@ class DataMixin(Base):
|
|
|
54
54
|
if k in _set_key: raise Exception(f'you can not set "self.{i}" value in {_set_key}.\nself.{i}={k!r}')
|
|
55
55
|
if i != 'date':
|
|
56
56
|
dtype = df[k].dtype
|
|
57
|
-
if not isinstance(dtype,
|
|
57
|
+
if not isinstance(dtype, np.dtypes.Float64DType): raise TypeError(f'Data column type must be "float64".(excluding "date" column)\ndf[{k!r}].dtype={dtype!r}')
|
|
58
58
|
|
|
59
59
|
for i in self.list_ma: df[f'ma{i}'] = df[self.close].rolling(i).mean()
|
|
60
60
|
|
|
@@ -66,25 +66,25 @@ class DataMixin(Base):
|
|
|
66
66
|
df['vleft'] = df['x'] - volumewidth_half
|
|
67
67
|
df['vright'] = df['x'] + volumewidth_half
|
|
68
68
|
|
|
69
|
-
df['top'] = np.where(df[
|
|
70
|
-
df['top'] = np.where(df[
|
|
71
|
-
df['bottom'] = np.where(df[
|
|
72
|
-
df['bottom'] = np.where(df[
|
|
69
|
+
df['top'] = np.where(df['open'] <= df['close'], df['close'], df['open'])
|
|
70
|
+
df['top'] = np.where(df['close'] < df['open'], df['open'], df['close'])
|
|
71
|
+
df['bottom'] = np.where(df['open'] <= df['close'], df['open'], df['close'])
|
|
72
|
+
df['bottom'] = np.where(df['close'] < df['open'], df['close'], df['open'])
|
|
73
73
|
|
|
74
74
|
# 양봉
|
|
75
75
|
df.loc[:, ['facecolor', 'edgecolor']] = (self.color_up, self.color_up)
|
|
76
76
|
if self.color_up != self.color_down:
|
|
77
77
|
# 음봉
|
|
78
|
-
df.loc[df[
|
|
78
|
+
df.loc[df['close'] < df['open'], ['facecolor', 'edgecolor']] = (self.color_down, self.color_down)
|
|
79
79
|
if self.color_up != self.color_flat:
|
|
80
80
|
# 보합
|
|
81
|
-
df.loc[df[
|
|
81
|
+
df.loc[df['close'] == df['open'], ['facecolor', 'edgecolor']] = (self.color_flat, self.color_flat)
|
|
82
82
|
if self.color_up != self.color_up_down:
|
|
83
83
|
# 양봉(비우기)
|
|
84
|
-
df.loc[(df['facecolor'] == self.color_up) & (df[
|
|
84
|
+
df.loc[(df['facecolor'] == self.color_up) & (df['close'] < df['close'].shift(1)), 'facecolor'] = self.color_up_down
|
|
85
85
|
if self.color_down != self.color_down_up:
|
|
86
86
|
# 음봉(비우기)
|
|
87
|
-
df.loc[(df['facecolor'] == self.color_down) & (df[
|
|
87
|
+
df.loc[(df['facecolor'] == self.color_down) & (df['close'].shift(1) < df['close']), ['facecolor']] = self.color_down_up
|
|
88
88
|
|
|
89
89
|
self.df = df
|
|
90
90
|
return
|
|
@@ -96,6 +96,9 @@ class NavgatorMixin(Mixin):
|
|
|
96
96
|
|
|
97
97
|
if self._navcoordinate[0] == self._navcoordinate[1]:
|
|
98
98
|
self._navcoordinate = (self._navcoordinate[0], self._navcoordinate[1]+self.min_distance)
|
|
99
|
+
|
|
100
|
+
self.background = None
|
|
101
|
+
self._draw()
|
|
99
102
|
return
|
|
100
103
|
|
|
101
104
|
|
|
@@ -105,27 +108,19 @@ class BackgroundMixin(NavgatorMixin):
|
|
|
105
108
|
self._restore_region()
|
|
106
109
|
return
|
|
107
110
|
|
|
108
|
-
def _restore_region(self, with_nav=True
|
|
111
|
+
def _restore_region(self, with_nav=True):
|
|
109
112
|
if not self.background: self._create_background()
|
|
110
113
|
|
|
111
|
-
if
|
|
112
|
-
elif empty_with_nav: self.canvas.restore_region(self.background_empty_with_nav)
|
|
113
|
-
elif with_nav: self.canvas.restore_region(self.background_with_nav)
|
|
114
|
+
if with_nav: self.canvas.restore_region(self.background_with_nav)
|
|
114
115
|
else: self.canvas.renderer.restore_region(self.background)
|
|
115
116
|
return
|
|
116
117
|
|
|
117
118
|
def _copy_bbox(self):
|
|
118
|
-
|
|
119
|
+
self.ax_slider.xaxis.draw(self.canvas.renderer)
|
|
120
|
+
self.ax_slider.yaxis.draw(self.canvas.renderer)
|
|
121
|
+
self.slidercollection.draw(self.canvas.renderer)
|
|
119
122
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
self.ax_slider.xaxis.draw(renderer)
|
|
123
|
-
self.ax_slider.yaxis.draw(renderer)
|
|
124
|
-
self.slidercollection.draw(renderer)
|
|
125
|
-
self.background_empty_with_nav = self.canvas.renderer.copy_from_bbox(self.fig.bbox)
|
|
126
|
-
|
|
127
|
-
self._draw_artist()
|
|
128
|
-
self.background = self.canvas.renderer.copy_from_bbox(self.fig.bbox)
|
|
123
|
+
super()._copy_bbox()
|
|
129
124
|
|
|
130
125
|
self.navigator.draw(self.canvas.renderer)
|
|
131
126
|
self.background_with_nav = self.canvas.renderer.copy_from_bbox(self.fig.bbox)
|
|
@@ -163,14 +158,15 @@ class DrawMixin(BackgroundMixin):
|
|
|
163
158
|
return
|
|
164
159
|
|
|
165
160
|
def _on_release(self, e: MouseEvent):
|
|
166
|
-
|
|
161
|
+
if e.inaxes is not self.ax_slider: return
|
|
162
|
+
self.is_click, self.is_move = (False, False)
|
|
163
|
+
|
|
164
|
+
if self._navcoordinate[0] == self._navcoordinate[1]:
|
|
165
|
+
self._navcoordinate = (self._navcoordinate[0], self._navcoordinate[1]+self.min_distance)
|
|
167
166
|
self._set_navigator(*self._navcoordinate)
|
|
168
167
|
|
|
169
|
-
self.
|
|
170
|
-
self.
|
|
171
|
-
self._create_background()
|
|
172
|
-
self._restore_region()
|
|
173
|
-
self._blit()
|
|
168
|
+
self.background = None
|
|
169
|
+
self._draw()
|
|
174
170
|
return
|
|
175
171
|
|
|
176
172
|
def _on_move(self, e: MouseEvent):
|
|
@@ -242,6 +238,27 @@ class DrawMixin(BackgroundMixin):
|
|
|
242
238
|
|
|
243
239
|
|
|
244
240
|
class LimMixin(DrawMixin):
|
|
241
|
+
def _restore_region(self, with_nav=True, empty=False):
|
|
242
|
+
if not self.background: self._create_background()
|
|
243
|
+
|
|
244
|
+
if empty: self.canvas.restore_region(self.background_empty)
|
|
245
|
+
elif with_nav: self.canvas.restore_region(self.background_with_nav)
|
|
246
|
+
else: self.canvas.renderer.restore_region(self.background)
|
|
247
|
+
return
|
|
248
|
+
|
|
249
|
+
def _copy_bbox(self):
|
|
250
|
+
self.ax_slider.xaxis.draw(self.canvas.renderer)
|
|
251
|
+
self.ax_slider.yaxis.draw(self.canvas.renderer)
|
|
252
|
+
self.slidercollection.draw(self.canvas.renderer)
|
|
253
|
+
self.background_empty = self.canvas.renderer.copy_from_bbox(self.fig.bbox)
|
|
254
|
+
|
|
255
|
+
self._draw_artist()
|
|
256
|
+
self.background = self.canvas.renderer.copy_from_bbox(self.fig.bbox)
|
|
257
|
+
|
|
258
|
+
self.navigator.draw(self.canvas.renderer)
|
|
259
|
+
self.background_with_nav = self.canvas.renderer.copy_from_bbox(self.fig.bbox)
|
|
260
|
+
return
|
|
261
|
+
|
|
245
262
|
def _on_release(self, e: MouseEvent):
|
|
246
263
|
if e.inaxes is not self.ax_slider: return
|
|
247
264
|
self.is_click, self.is_move = (False, False)
|
|
@@ -251,14 +268,12 @@ class LimMixin(DrawMixin):
|
|
|
251
268
|
self._set_navigator(*self._navcoordinate)
|
|
252
269
|
self._lim()
|
|
253
270
|
|
|
254
|
-
self.
|
|
255
|
-
self.
|
|
256
|
-
self._create_background()
|
|
257
|
-
self._blit()
|
|
271
|
+
self.background = None
|
|
272
|
+
self._draw()
|
|
258
273
|
return
|
|
259
274
|
|
|
260
275
|
def _on_move(self, e):
|
|
261
|
-
self._restore_region(with_nav=(not self.is_click),
|
|
276
|
+
self._restore_region(with_nav=(not self.is_click), empty=self.is_click)
|
|
262
277
|
|
|
263
278
|
self._on_move_action(e)
|
|
264
279
|
|
|
@@ -314,7 +329,7 @@ class LimMixin(DrawMixin):
|
|
|
314
329
|
|
|
315
330
|
class SimpleMixin(LimMixin):
|
|
316
331
|
simpler = False
|
|
317
|
-
limit_volume =
|
|
332
|
+
limit_volume = 2_000
|
|
318
333
|
|
|
319
334
|
def __init__(self, *args, **kwargs):
|
|
320
335
|
super().__init__(*args, **kwargs)
|
|
@@ -336,7 +351,7 @@ class SimpleMixin(LimMixin):
|
|
|
336
351
|
seg = self.df[['x', self.high, self.low]].agg(get_wickline, axis=1)
|
|
337
352
|
self.blitcandle.set_segments(seg)
|
|
338
353
|
self.blitcandle.set_edgecolor(self.df['edgecolor'])
|
|
339
|
-
self.priceline.set_verts(
|
|
354
|
+
self.priceline.set_verts([self.df[['x', self.close]].apply(tuple, axis=1).tolist()])
|
|
340
355
|
|
|
341
356
|
volmax = self.df[self.volume].max()
|
|
342
357
|
l = self.df.__len__()
|
|
@@ -366,20 +381,12 @@ class SimpleMixin(LimMixin):
|
|
|
366
381
|
self.ax_price.xaxis.draw(renderer)
|
|
367
382
|
self.ax_price.yaxis.draw(renderer)
|
|
368
383
|
|
|
369
|
-
|
|
370
|
-
Range = right - left
|
|
371
|
-
if self.simpler:
|
|
372
|
-
if Range < 1_000: self.blitcandle.draw(renderer)
|
|
373
|
-
else: self.priceline.draw(renderer)
|
|
384
|
+
if self.simpler: self.blitcandle.draw(renderer)
|
|
374
385
|
elif self.candle_on_ma:
|
|
375
386
|
self.macollection.draw(renderer)
|
|
376
|
-
|
|
377
|
-
elif 800 < Range: self.blitcandle.draw(renderer)
|
|
378
|
-
else: self.candlecollection.draw(renderer)
|
|
387
|
+
self.candlecollection.draw(renderer)
|
|
379
388
|
else:
|
|
380
|
-
|
|
381
|
-
elif 800 < Range: self.blitcandle.draw(renderer)
|
|
382
|
-
else: self.candlecollection.draw(renderer)
|
|
389
|
+
self.candlecollection.draw(renderer)
|
|
383
390
|
self.macollection.draw(renderer)
|
|
384
391
|
|
|
385
392
|
self.ax_volume.xaxis.draw(renderer)
|
|
@@ -429,16 +436,12 @@ class ClickMixin(SimpleMixin):
|
|
|
429
436
|
if not self.is_click: return
|
|
430
437
|
elif e.inaxes is self.ax_slider: return super()._on_release(e)
|
|
431
438
|
elif not self.in_price and not self.in_volume and not self.is_click_chart: return
|
|
432
|
-
# 차트 click release action
|
|
433
439
|
self.canvas.set_cursor(cursors.POINTER)
|
|
434
440
|
self.is_click, self.is_move = (False, False)
|
|
435
441
|
self.is_click_chart = False
|
|
436
442
|
|
|
437
|
-
self.
|
|
438
|
-
self.
|
|
439
|
-
self._create_background()
|
|
440
|
-
self._blit()
|
|
441
|
-
return
|
|
443
|
+
self._draw()
|
|
444
|
+
return self._restore_region()
|
|
442
445
|
|
|
443
446
|
def _on_chart_click(self, e: MouseEvent):
|
|
444
447
|
self.is_click = True
|
|
@@ -466,7 +469,7 @@ class ClickMixin(SimpleMixin):
|
|
|
466
469
|
return
|
|
467
470
|
|
|
468
471
|
def _on_move(self, e):
|
|
469
|
-
self._restore_region(with_nav=(not self.is_click),
|
|
472
|
+
self._restore_region(with_nav=(not self.is_click), empty=self.is_click)
|
|
470
473
|
|
|
471
474
|
self._on_move_action(e)
|
|
472
475
|
|
|
@@ -591,7 +594,6 @@ if __name__ == '__main__':
|
|
|
591
594
|
df = pd.DataFrame(data)
|
|
592
595
|
|
|
593
596
|
t = time()
|
|
594
|
-
# c = SimpleMixin()
|
|
595
597
|
c = SliderMixin()
|
|
596
598
|
c.set_data(df)
|
|
597
599
|
t2 = time() - t
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: seolpyo-mplchart
|
|
3
|
-
Version: 0.0.
|
|
4
|
-
Summary: Fast candlestick chart using Python.
|
|
3
|
+
Version: 0.0.31
|
|
4
|
+
Summary: Fast candlestick chart using Python.
|
|
5
5
|
Author-email: white-seolpyo <white-seolpyo@naver.com>
|
|
6
6
|
License: MIT License
|
|
7
7
|
Project-URL: Homepage, https://white.seolpyo.com/
|
|
@@ -22,8 +22,8 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
23
|
Requires-Python: >=3.11
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
|
-
Requires-Dist: matplotlib>=3.
|
|
26
|
-
Requires-Dist: pandas>=2.
|
|
25
|
+
Requires-Dist: matplotlib>=3.9.2
|
|
26
|
+
Requires-Dist: pandas>=2.2.2
|
|
27
27
|
|
|
28
28
|
# Donation
|
|
29
29
|
Bitcoin: 1MKCHW8smDZv5DFMiVkA5G3DeXcMn871ZX
|
|
@@ -38,10 +38,6 @@ Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
# Sample
|
|
41
|
-

|
|
42
42
|
|
|
43
|
-

|
|
46
|
-
|
|
47
|
-

|
|
43
|
+

|
seolpyo_mplchart-0.0.6/README.md
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Donation
|
|
2
|
-
Bitcoin: 1MKCHW8smDZv5DFMiVkA5G3DeXcMn871ZX
|
|
3
|
-
|
|
4
|
-
Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
# Document
|
|
8
|
-
[English](https://white.seolpyo.com/entry/148/)
|
|
9
|
-
|
|
10
|
-
[한글](https://white.seolpyo.com/entry/147/)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# Sample
|
|
14
|
-

|
|
15
|
-
|
|
16
|
-

|
|
17
|
-
|
|
18
|
-

|
|
19
|
-
|
|
20
|
-

|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{seolpyo_mplchart-0.0.6 → seolpyo_mplchart-0.0.31}/seolpyo_mplchart.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|