{"id":24712,"library":"timple","title":"Timple","description":"A Python library that extends Matplotlib's plotting capabilities for timedelta-like values, providing custom tick locators and formatters for intuitive axis formatting. Version 0.1.8 supports Python >=3.7 and is actively maintained.","status":"active","version":"0.1.8","language":"python","source_language":"en","source_url":"https://github.com/theOehrly/Timple","tags":["matplotlib","timedelta","plotting","time series","pandas"],"install":[{"cmd":"pip install timple","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core integration with Matplotlib's axis formatter and locator API","package":"matplotlib","optional":false},{"reason":"Required for converting Pandas Timedelta and NaT objects","package":"pandas","optional":false},{"reason":"Used for array operations and compatibility","package":"numpy","optional":false}],"imports":[{"note":"Main converter class for timedelta axis formatting","wrong":"","symbol":"TimedeltaConverter","correct":"from timple import TimedeltaConverter"},{"note":"Concise timedelta tick locator","wrong":"","symbol":"ticker_concise","correct":"from timple import ticker_concise"},{"note":"Short timedelta tick locator","wrong":"","symbol":"ticker_short","correct":"from timple import ticker_short"},{"note":"Concise timedelta formatter","wrong":"","symbol":"formatter_concise","correct":"from timple import formatter_concise"},{"note":"Short timedelta formatter","wrong":"","symbol":"formatter_short","correct":"from timple import formatter_short"}],"quickstart":{"code":"import matplotlib.pyplot as plt\nimport pandas as pd\nfrom timple import TimedeltaConverter\n\n# Create a simple timedelta series\ntimes = pd.to_timedelta(['00:00:00', '00:01:30', '00:03:00', '00:04:30'])\nvalues = [1, 2, 3, 4]\n\nfig, ax = plt.subplots()\nax.plot(times, values)\n\n# Apply Timple converter\nTimedeltaConverter(times).apply(ax.xaxis)\n\nax.set_xlabel('Time')\nax.set_ylabel('Value')\nplt.show()","lang":"python","description":"Plot timedelta data with automatic axis formatting."},"warnings":[{"fix":"Use TimedeltaConverter(timedelta_data).apply(axis_object) where axis_object is an Axes.xaxis or Axes.yaxis.","message":"Timple converters only work with ax.xaxis or ax.yaxis, not directly with plt.xticks(). Apply the converter to the desired axis instance.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to timple>=0.1.6 or convert to numpy array with np.array(your_list).","message":"Passing a list or tuple of Pandas Timedelta objects can cause crashes in versions prior to 0.1.6. Ensure you use NumPy array or Pandas Series.","severity":"gotcha","affected_versions":"<0.1.6"},{"fix":"Use ticker_concise or formatter_concise directly instead.","message":"The argument 'concise' was deprecated in v0.1.1 in favor of separate locators/formatters. Avoid passing concise=True to the converter.","severity":"deprecated","affected_versions":">=0.1.1"},{"fix":"Upgrade to timple>=0.1.2 or drop NaT with times.dropna() if using Pandas Series.","message":"When using Pandas NaT values, converters may fail on older versions (before 0.1.2). Upgrade or drop NaT values before plotting.","severity":"gotcha","affected_versions":"<0.1.2"},{"fix":"Upgrade to timple>=0.1.6 or avoid using masked arrays.","message":"Masked arrays introduced in Matplotlib 3.7.0 are only supported from timple 0.1.6 onwards. Plotting masked timedelta data with earlier versions will crash.","severity":"gotcha","affected_versions":"<0.1.6"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you have installed timple>=0.1.0 and use correct import: 'from timple import TimedeltaConverter'.","cause":"Incorrect import or outdated version (TimedeltaConverter was added likely after 0.1.0).","error":"AttributeError: module 'timple' has no attribute 'TimedeltaConverter'"},{"fix":"Convert data to Pandas Timedelta or numpy timedelta64 array before passing to converter: times = pd.to_timedelta(times_list).","cause":"Data is not in a format that TimedeltaConverter expects (e.g., plain datetime.timedelta or list of strings).","error":"TypeError: cannot convert timedelta to matplotlib format"},{"fix":"Upgrade to timple>=0.1.2 or drop NaT values using .dropna() on a Pandas Series.","cause":"Passing a Pandas NaT alongside valid timedeltas on timple <0.1.2.","error":"ValueError: The truth value of a Timedelta is ambiguous"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}