Repository navigation
1.1.7
fix: correct HSP sphere visualization by scaling D axis by 2
The Hansen distance formula sqrt(4·dD² + dP² + dH²) defines an ellipsoid with semi-axis R/2 in D and R in P and H. The previous code drew a Euclidean sphere of radius R, making the visual boundary twice too wide in D — solvents with RED > 1 (outside) could appear inside the drawn shape.
Fix by plotting 2D on the D axis (matching the standard HSP convention), which maps the true ellipsoidal boundary to a perfect circle/sphere in the plot. A FuncFormatter divides tick values by 2 so axis labels still display real D values. Applies to all D-bearing axes in both plot_3d (y-axis) and plot_2d (ax2 H×D and ax3 P×D). The P×H subplot is unaffected since both axes have coefficient 1 in the Hansen formula.