Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Mask singularity like matplotlib

$
0
0

I use Dash for graphing various functions, like 1 / x, etc, that have a singularity (1 / 0) is undefined. However, Dash insists on connecting the dots on either side of 0.
matplotlib allows masking out around a singularity.
For example, if a singularity is at 2 … snippet

step = 0.01
xx = np.arange(-0.5, 5.5, step)
singularity_x = 2
xx = np.ma.masked_inside(xx, singularity_x - step, singularity_x + step)

I could elaborate, however, I’ll float this basic question for now about masking in Dash Python.

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 6271

Latest Images

Trending Articles



Latest Images