Skip to main content

Common tool packaging

Project description

Introduction

jcgg的妙妙工具包,包含gurobi、matplot相关函数。

Matplotlib tools

提供更为强大的svg矢量图导出功能,完整功能需要结合axisartist使用。 在plot选项当中添加gid="out"参数,将折线线段化,并剔除超出坐标轴的图线,实现图像在ppt、visio等工具当中的更多编辑功能。

使用示例如下:

from ltoolx.matplotlib_utils import *
from ltoolx.svg_utils import
import mpl_toolkits.axisartist as AA
# plt直接使用方法
plt.axes(axes_class=AA.Axes)
plt.plot([1, 2, 3], [3, 5, 4], label="inax", marker="s")
plt.plot(
    [1, 2, 3], [5, 15, 3], gid="out", label="outax", linestyle="--", marker="o"
)
plt.xlim([1.25, 3])
plt.ylim([4.0, 10.0])
plt.legend()

savefig("test1.svg")

# 创建figure对象使用方法
fig= plt.figure()
ax = fig.add_subplot(axes_class=AA.Axes)
ax.plot([1,2,3],[3,2,4],label='inax')
ax.plot([1,2,3],[5,15,3],label='outax',gid='out')
ax.set_ylim([0,10])
ax.legend()
Fig(fig).savefig("test2.svg")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ltoolx-0.1.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ltoolx-0.1.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file ltoolx-0.1.2.tar.gz.

File metadata

  • Download URL: ltoolx-0.1.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.3 Windows/11

File hashes

Hashes for ltoolx-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4dca0f5c4690cf4d567fd4ca67c0ba134e1bf03f212beed1dbdd46d33be06759
MD5 4932de3b95edd92b7edd1867515c9d2b
BLAKE2b-256 3bd4263c8ee323357bc0147375fc4b4f931695cfea76ff5565715895a60ce09f

See more details on using hashes here.

File details

Details for the file ltoolx-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ltoolx-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.3 Windows/11

File hashes

Hashes for ltoolx-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a31f72af5ce629c09b5da61862f9f97633c120f7a975dda38befe0516ae10e67
MD5 c66644d97f4ae544ad208339f4969f5f
BLAKE2b-256 51456c3d064979c863d76818d8dc0ae8bfbc3bdef70e1ef95cce9e7591a034cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page