Skip to content

Commit 8d2a546

Browse files
committed
Fix import error
1 parent c1d5abf commit 8d2a546

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

mplaltair/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import mplaltair.parse_chart as parse_chart
1+
import mplaltair.parse_chart
22
import matplotlib
33
import altair
44
import matplotlib.pyplot as plt
@@ -23,7 +23,7 @@ def convert(alt_chart):
2323
ax : matplotlib.axes
2424
2525
"""
26-
chart = parse_chart.ChartMetadata(alt_chart)
26+
chart = mplaltair.parse_chart.ChartMetadata(alt_chart)
2727
fig, ax = plt.subplots()
2828

2929
if chart.mark in ['point', 'circle', 'square']: # scatter

mplaltair/_axis.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import matplotlib.dates as mdates
22
import matplotlib.ticker as ticker
33
import numpy as np
4-
from ._data import _locate_channel_data, _locate_channel_dtype, _locate_channel_scale, _locate_channel_axis, _convert_to_mpl_date
4+
from ._data import _convert_to_mpl_date
55

66

77
def _set_limits(channel, mark, ax):
@@ -170,11 +170,7 @@ def _set_tick_formatter(channel, ax):
170170
Matplotlib only supports datetime.strftime formatting for dates.
171171
"""
172172
current_axis = {'x': ax.xaxis, 'y': ax.yaxis}
173-
format_str = ''
174-
175-
# format_str = channel.axis.get('format', '')
176-
if 'format' in channel.axis:
177-
format_str = channel.axis['format']
173+
format_str = channel.axis.get('format', '')
178174

179175
if channel.type == 'temporal':
180176
if not format_str:

mplaltair/_convert.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from ._data import _locate_channel_data, _locate_channel_dtype
2-
31

42
def _allowed_ranged_marks(enc_channel, mark):
53
"""TODO: DOCS

mplaltair/tests/test_axis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import pandas as pd
55
from mplaltair import convert
66
from .._axis import convert_axis
7-
from parse_chart import ChartMetadata
7+
from ..parse_chart import ChartMetadata
88
import pytest
99

1010
df_quant = pd.DataFrame({

0 commit comments

Comments
 (0)