0
$\begingroup$

I want to save both the plot and the legend together,I have used the Export to save the picture.The picture is as shown below. enter image description here

But it did not achieve my intended purpose. I want to achieve the kind of the following figure, but this can only be achieved through the amplification, but the enlarged picture can not be saved. I need help! enter image description here

$\endgroup$
2
  • 2
    $\begingroup$ You really need to edit this question and include the code that generated the plot and the code that did the exporting. Be sure to include all supporting code so all variables are defined. $\endgroup$ Commented Feb 23, 2017 at 7:50
  • $\begingroup$ Have you seen How can I save both the plot and the legend together? $\endgroup$ Commented Feb 23, 2017 at 8:14

1 Answer 1

2
$\begingroup$

You might want to export the expression of the plot, for example, as a png to the directory in which you have your notebook. Example:

plot = Plot3D[Sin[x^2 + y], {x, 0, Pi}, {y, 0, Pi}, ColorFunction -> "Rainbow", PlotLegends -> Automatic, AxesLabel -> {"x", "y", "f(x,y)"}] Export[NotebookDirectory[] <> "example.png", plot] 

This will export the expression plot to the directory in which the notebook has been saved as "example.png" and you will see the plot with the legend

enter image description here

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.