I think you should first try to fix which type of spline you are using. e.g, b spline, cubic spline, restricted cubic spline, quadratic spline etc. For example I used restricted cubic spline. Then, test multiple knot positions. I would recommend trying out Harrel's knot positions. Run the regression model with each of the knot positions and save the model estimates after running each equation. Then compare the fit of the models and select the model with the best fit (e.g, lowest AIC value). Also make sure your non linear models are a better fit than your linear model. In my case, RC spline with 3 knots were the best fit. Next I tried various combinations of 3 knots (e.g, at 5, 50, 95 percentiles, at 10, 50, 90 percentiles and at 25, 50, 75 percentiles. subsequently i checked the fit of the models with these models and found the 5, 50, 95 positions best fit. Ten I fit the model with the values of the continuous term corresponding to 5, 50th and 95th percentiles as knot positions and ran the model. Then after, i output the log odds ratios and then graphed it.