The type of rod (action profile), the type of fishing (dries, indicator rigs, streamers) typical casting distance, stream or river size and casting ability need to be considered when choosing a line. Trial and error can cost money.
I can match any of my rods from ultra fast Sage Ignitor to Med Scott GS with one of the following, Rio Gold, Rio Tech Trout, SA Standard and SA Trout. Example would be Ignitor - Gold, Scott GS - SA Trout. Gold is .3 over standard weight and a good general purpose line. The others are standard weight.
There are others including 1/2 weight to 1 weight over for unique situations but the lines above is where I start.