The following approach:

  • hides the spine representing the existing x-axis
  • adds a dummy point for zero (e.g. at x=40)
  • draws some lines for the kink, using clip_on=False to draw outside the main axes' area, and ax.get_xaxis_transform() to use "data coordinates" for x and "axes coordinates" for y (0 at the bottom and 1 at the top); the thickness and line color are copied from the spine
  • shows the dummy zero position as 0
import matplotlib.pyplot as plt
import numpy as np

data = np.random.randint(50, 89, 80)
bins = np.arange(50, data.max()+6, 5)
fig, ax = plt.subplots(figsize=(12,5))

ax.hist(data, bins=bins, fc='skyblue', ec='navy')
false_zero = bins[0] - 10
ax.set_xticks(np.append(false_zero, bins))
ax.set_xticklabels(np.append(0, bins))

for spine in ['top', 'right', 'bottom']:
    ax.spines[spine].set_visible(False)
ax.add_line(plt.Line2D(xdata=[false_zero, false_zero + 2, false_zero + 4, false_zero + 4, false_zero + 6, bins[-1] + 1],
                       ydata=[0, 0, 0.1, -0.1, 0, 0],
                       color=ax.spines['bottom'].get_edgecolor(), lw=ax.spines['bottom'].get_linewidth(),
                       clip_on=False, transform=ax.get_xaxis_transform()))
plt.tight_layout()
plt.show()

PS: For the kink of the original post:

ax.add_line(plt.Line2D(xdata=[false_zero, false_zero + 2, false_zero + 2, false_zero + 6, false_zero + 6, bins[-1] + 1],
                       ydata=[0, 0, 0.1, -0.1, 0, 0], ...))

Answer from JohanC on Stack Overflow
๐ŸŒ
GitHub
github.com โ€บ kodemore โ€บ kink
GitHub - kodemore/kink: Dependency injection container made for Python ยท GitHub
Dependency injection container made for Python. Contribute to kodemore/kink development by creating an account on GitHub.
Starred by 442 users
Forked by 30 users
Languages ย  Python
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ dependency injection made simple in python
r/Python on Reddit: Dependency Injection Made simple in Python
April 27, 2021 -

I have had enough of global variables, usage of global scope and hundreds of complex monkey patching flying around in our codebase at work so I made DI Container specially for python.We are using it right now with success on production environments and our codebase got better thanks to it. Thought I will share it and ask for your opinions.

Happy reading :)

https://github.com/kodemore/kink

๐ŸŒ
PyPI
pypi.org โ€บ project โ€บ kink โ€บ 0.1.3
kink
December 26, 2019 - JavaScript is disabled in your browser. Please enable JavaScript to proceed ยท A required part of this site couldnโ€™t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
๐ŸŒ
Medium
snir-orlanczyk.medium.com โ€บ python-di-dependency-injection-part-2-containers-c621f4311d55
Python โ€” DI (dependency injection ) โ€” Part 2 โ€” Containers | by Snir Orlanczyk | Medium
November 29, 2023 - In this example I created a wrapper around kink, i used it as a very simple DI container that covers all the basic needs, and the implementation of it is straight forward and simple to understand and review.
๐ŸŒ
Netguru
netguru.com โ€บ home page โ€บ blog โ€บ dependency injection with python, make it easy!
Dependency Injection With Python, Make It Easy!
October 11, 2023 - In all of my projects, I use kink (kodemore/kink) โ€“ it's a library created by my friend. ๐Ÿ˜‰ ยท It provides us with a dependency injection container with an elegant pythonic way of using it, together with just one Python decorator to mark classes and functions that need the injection.
๐ŸŒ
Ets-labs
python-dependency-injector.ets-labs.org
Dependency Injector โ€” Dependency injection framework for Python โ€” Dependency Injector 4.49.1 documentation
Dependency Injector is a dependency injection framework for Python. It helps to maintain you application structure. It was designed to be unified, developer-friendly tool that helps to implement dependency injection design pattern in formal, pretty, Pythonic way.
๐ŸŒ
GitHub
github.com โ€บ kinkgarden
kink.garden ยท GitHub
share your kinks with your friends, or the world ยท Python 7 1 ยท botto.ms ยท botto.ms Public ยท source code for https://botto.ms ยท HTML ยท Showing 2 of 2 repositories ยท kinkgarden Public ยท share your kinks with your friends, or the world ยท There was an error while loading.
Find elsewhere
๐ŸŒ
ResearchGate
researchgate.net โ€บ post โ€บ Is_there_a_python_script_to_help_with_the_measurement_of_the_twist_kink_in_a_beta_strand_that_can_used_in_Maestro
Is there a python script to help with the measurement of the twist/kink in a beta strand that can used in Maestro? | ResearchGate
October 25, 2021 - Beta barrels have a characteristic right handed twist. I am interested in comparing different models of the same beta sheets by just how twisted they are against each other. Is there a python...
๐ŸŒ
eBay
ebay.com โ€บ clothing, shoes & accessories โ€บ women โ€บ women's clothing โ€บ dresses
PATRICE CATANZARO Python Kink Dress Wetlook Mini-Kleid Transparent CLUBWEAR | eBay
PATRICE CATANZARO Python Kink Dress Wetlook Mini-Kleid Transparent CLUBWEAR
PATRICE CATANZARO Python Kink Dress Wetlook Mini-Kleid Transparent CLUBWEARPATRICE CATANZARO Python Kink Dress Wetlook Mini-Kleid Transparent CLUBWEAR
Price ย  $132.04
๐ŸŒ
Python Line Sets
pythonls.com โ€บ home โ€บ faqs
FAQs - Python Line Sets
August 20, 2024 - While Python is less likely to kink than copper, it is susceptible to kinking once the minimum bend radius is exceeded.
๐ŸŒ
ResearchGate
researchgate.net โ€บ publication โ€บ 331391178_Some_Recent_Developments_on_Kink_Collisions_and_Related_Topics_Python_Version
Some Recent Developments on Kink Collisions and Related Topics: Python Version | Request PDF
February 1, 2019 - Request PDF | Some Recent Developments on Kink Collisions and Related Topics: Python Version | We review recent works on modeling of dynamics of kinks in 1\(+\)1 dimensional \(\phi ^4\) theory and other related models, like sine-Gordon model... | Find, read and cite all the research you need ...
๐ŸŒ
Socket
socket.dev โ€บ pypi โ€บ package โ€บ kink
kink - PyPI Package Security Analysis - Socket
Dependency injection for python. Version: 0.9.0 was published by krac. Start using Socket to analyze kink and its dependencies to secure your app from...
๐ŸŒ
Python Line Sets
pythonls.com โ€บ home โ€บ about
About - Python Line Sets
August 20, 2024 - As an alternative to copper pipe, Python is light-weight, chemical resistant, UV resistant, and tear and kink resistant. Pricing is competitive and more stable than copper line set pipe pricing. Python is less likely to be stolen on job sites.
๐ŸŒ
YouTube
youtube.com โ€บ watch
- YouTube
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
Published ย  May 22, 2020
๐ŸŒ
LibHunt
libhunt.com โ€บ compare-kink-vs-python-dependency-injector
kink vs Dependency Injector - compare differences and reviews? | LibHunt
connexion - Connexion is a modern Python web framework that makes spec-first and api-first development easy. kink vs flama Dependency Injector vs django-rest-framework kink vs injector Dependency Injector vs falcon kink vs flask_injector Dependency Injector vs connexion