title: Saving an Matlabplot as an MLFlow artifact
body: <p>I am using DataBricks and Spark 7.4ML,</p>
  <p>The following code successfully logs the params and metrics, and I can see the ROCcurve.png in the MLFLOW gui (just the item in the tree below the model). But the actually plot is blank. Why?</p>
  <pre><code>with mlflow.start_run(run_name=&quot;logistic-regression&quot;) as run:
    pipeModel = pipe.fit(trainDF)
    mlflow.spark.log_model(pipeModel, &quot;model&quot;)
    predTest = pipeModel.transform(testDF)
    predTrain = pipeModel.transform(trainDF)
    evaluator=BinaryClassificationEvaluator(labelCol=&quot;arrivedLate&quot;)
    trainROC = evaluator.evaluate(predTrain)
    testROC = evaluator.evaluate(predTest)
    print(f&quot;Train ROC: {trainROC}&quot;)
    print(f&quot;Test ROC: {testROC}&quot;)
    mlflow.log_param(&quot;Dataset Name&quot;, &quot;Flights &quot; + datasetName)
    mlflow.log_metric(key=&quot;Train ROC&quot;, value=trainROC)
    mlflow.log_metric(key=&quot;Test ROC&quot;, value=testROC)
  
    lrModel = pipeModel.stages[3]
    trainingSummary = lrModel.summary
    roc = trainingSummary.roc.toPandas()
    plt.plot(roc['FPR'],roc['TPR'])
    plt.ylabel('False Positive Rate')
    plt.xlabel('True Positive Rate')
    plt.title('ROC Curve')
    plt.show()
    plt.savefig(&quot;ROCcurve.png&quot;)
    mlflow.log_artifact(&quot;ROCcurve.png&quot;)
    plt.close()
    
    display(predTest.select(stringCols + [&quot;arrivedLate&quot;, &quot;prediction&quot;]))
  </code></pre>
  <p>What the notebook shows:</p>
  <p><a href="https://i.stack.imgur.com/sCIN9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/sCIN9.png" alt="enter image description here" /></a></p>
  <p>What the MLFlow shows:</p>
  <p><a href="https://i.stack.imgur.com/oXk8Y.png" rel="noreferrer"><img src="https://i.stack.imgur.com/oXk8Y.png" alt="enter image description here" /></a></p>