Skip to content

Commit

Permalink
Reflect numpy dtype change from float to float16/64
Browse files Browse the repository at this point in the history
  • Loading branch information
pagmatt authored Jul 15, 2024
1 parent 822e414 commit a4c52fa
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/tikzplotlib/_legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,40 +122,40 @@ def _get_location_from_best(obj):
# (or center) of the axes box.
# 1. Key points of the legend
lower_left_legend = x0_legend
lower_right_legend = np.array([x1_legend[0], x0_legend[1]], dtype=np.float_)
upper_left_legend = np.array([x0_legend[0], x1_legend[1]], dtype=np.float_)
lower_right_legend = np.array([x1_legend[0], x0_legend[1]], dtype=np.float64_)
upper_left_legend = np.array([x0_legend[0], x1_legend[1]], dtype=np.float64_)
upper_right_legend = x1_legend
center_legend = x0_legend + dimension_legend / 2.0
center_left_legend = np.array(
[x0_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float_
[x0_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float64_
)
center_right_legend = np.array(
[x1_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float_
[x1_legend[0], x0_legend[1] + dimension_legend[1] / 2.0], dtype=np.float64_
)
lower_center_legend = np.array(
[x0_legend[0] + dimension_legend[0] / 2.0, x0_legend[1]], dtype=np.float_
[x0_legend[0] + dimension_legend[0] / 2.0, x0_legend[1]], dtype=np.float64_
)
upper_center_legend = np.array(
[x0_legend[0] + dimension_legend[0] / 2.0, x1_legend[1]], dtype=np.float_
[x0_legend[0] + dimension_legend[0] / 2.0, x1_legend[1]], dtype=np.float64_
)

# 2. Key points of the axes
lower_left_axes = x0_axes
lower_right_axes = np.array([x1_axes[0], x0_axes[1]], dtype=np.float_)
upper_left_axes = np.array([x0_axes[0], x1_axes[1]], dtype=np.float_)
lower_right_axes = np.array([x1_axes[0], x0_axes[1]], dtype=np.float64_)
upper_left_axes = np.array([x0_axes[0], x1_axes[1]], dtype=np.float64_)
upper_right_axes = x1_axes
center_axes = x0_axes + dimension_axes / 2.0
center_left_axes = np.array(
[x0_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float_
[x0_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float64_
)
center_right_axes = np.array(
[x1_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float_
[x1_axes[0], x0_axes[1] + dimension_axes[1] / 2.0], dtype=np.float64_
)
lower_center_axes = np.array(
[x0_axes[0] + dimension_axes[0] / 2.0, x0_axes[1]], dtype=np.float_
[x0_axes[0] + dimension_axes[0] / 2.0, x0_axes[1]], dtype=np.float64_
)
upper_center_axes = np.array(
[x0_axes[0] + dimension_axes[0] / 2.0, x1_axes[1]], dtype=np.float_
[x0_axes[0] + dimension_axes[0] / 2.0, x1_axes[1]], dtype=np.float64_
)

# 3. Compute the distances between comparable points.
Expand Down

0 comments on commit a4c52fa

Please sign in to comment.