We need to use cmdrunner-2.0.jar
Firstly, download cmdrunner-2.0.jar from here:https://jmeter-plugins.org/wiki/PluginsManagerAutomated/
Then execute command line :
java -jar D:apache-jmeter-4.0libcmdrunner-2.0.jar --tool Reporter --input-jtl %WORKSPACE%
esult_output\%TestAPI%.jtl --plugin-type TimesVsThreads --generate-png %WORKSPACE%
esult_outputResponseTimesvsThreads.png
About how to use cmdrunner, please reference:https://jmeter-plugins.org/wiki/JMeterPluginsCMD/
At last, attach the image in email, please see screenshot.