What is the relationship between fuel mixture, throttle setting and engine temperature?
This image from Lycomings leaning instructions is likely what you are looking for:

The misnomer may be that leaning always increases the temperature of the engine. If you start at full rich or something above peak lean temp, leaning the engine will cause the CHT and EGT to rise until it hits its peak. If you continue to lean beyond this the temperature will start to drop again, and rapidly, but so will the power generated and at some point you run the risk of simply cutting the engine out so generally you want to lean to &quot;peak EGT&quot; since thats as low as you are practically going to want to go (unless you want worse fuel economy while flying slower).
If you look at the chart you will see below peak EGT your specific fuel consumption will also start to increase again.
Broadly speaking you can also see that increasing the mixture within its general operating range has a cooling effect on the engine.
If you are flying GA planes I would say the primary points in regards to engine temp is simply:

Keep an eye on temps and don't overheat the engine.
Lean slowly and carefully, keeping an eye on EGT or CHT for warm up which may not be immediate while leaning

If the gauge is creeping up, richen the mixture and consider reducing your angle of climb to increase airflow over the engine.