# Piecewise linear fitting of a curve in loglog plot

Iam basically trying to fit a curve similar to that shown in fig (a) with 7 straight line segments (ie. 6 knots) as shown in fig (b) and I need to get the optimum knot positions. This is a tripartite plot in which there are 4 axes (vertical , one inclined at 45 degrees with horizontal, other inclined at 135 degrees with the horizontal ) and the horizontal axis and all are in log scale. Constraints are 3 rd line should be parallel to 45 degree lines, 4 th line should be parallel to the horizontal, 5th line should be parallel to 135 degree lines as shown in the attachment. – Aiswarya 11 mins ago . • Welcome to SciComp Exchange. You tell us what the problem is, but it is not clear what you are trying to do. Can you describe the function? Add an image? And, why is important that the function is plotted in loglog scale? – nicoguaro Feb 25 '15 at 15:17
• Hi , Iam basically trying to fit a curve similar to that shown in fig (a) with 7 straight line segments (ie. 6 knots) as shown in fig (b) and I need to get the optimum knot positions. This is a tripartite plot in which there are 4 axes (vertical , one inclined at 45 degrees with horizontal, other inclined at 135 degrees with the horizontal ) and the horizontal axis and all are in log scale. Constraints are 3 rd line should be parallel to 45 degree lines, 4 th line should be parallel to the horizontal, 5th line should be parallel to 135 degree lines as shown in the attachment. – Aiswarya Feb 26 '15 at 7:49
• Is it sufficient to fit y=log(SV/(PGA*PGD)^0.5) and x=log(T/Tcg) with those lines? It seems that the information about all these axis are not related to such a fit. Is there a symmetry condition around x=0 involved? – Bort Mar 3 '15 at 17:06