# Revision history [back]

### How to export a plot to a jpg/png file

Hi everybody, I've got some problems with saving/exporting images. This is my code:

var ('x y z')

#Define a 3d curve as the intersection of 2 surfaces
#(but not explicit in z so we must use implicit plots)

# Let's plot
xmin=-3; xmax=3; ymin=-1; ymax=5; zmin=-3; zmax=3;

# Axes
Ax=line3d(([xmin,0,0],[xmax,0,0]), thickness=2, color='red')
Ay=line3d(([0,ymin,0],[0,ymax,0]), thickness=2, color='blue')
Az=line3d(([0,0,zmin],[0,0,zmax]), thickness=2, color='green')

# Surfaces
S1=implicit_plot3d(y==x^2+z^2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='yellow')
S2=implicit_plot3d(z==y/2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='purple')

show(S1+S2+Ax+Ay+Az, aspect_ratio=[1,1,1])

I just wanted to execute the code, rotate the plot right from the graphics and export the image as a png file. This should by done by right-clicking on the plot and chosing export to png from the menu... Unfortunately, the output is a blank screen with just the string "Invalid JSmol request: saveFile" Any suggestion, please? I'm working with the OS X version, and I'm a total newbie... Thanks in advice, Mauro

 2 None tmonteil 23073 ●25 ●166 ●422 http://wiki.sagemath.o...

### How to export a plot to a jpg/png file

Hi everybody, I've got some problems with saving/exporting images. This is my code:

var ('x y z')

#Define a 3d curve as the intersection of 2 surfaces
#(but not explicit in z so we must use implicit plots)

# Let's plot
xmin=-3; xmax=3; ymin=-1; ymax=5; zmin=-3; zmax=3;

# Axes
Ax=line3d(([xmin,0,0],[xmax,0,0]), thickness=2, color='red')
Ay=line3d(([0,ymin,0],[0,ymax,0]), thickness=2, color='blue')
Az=line3d(([0,0,zmin],[0,0,zmax]), thickness=2, color='green')

# Surfaces
S1=implicit_plot3d(y==x^2+z^2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='yellow')
S2=implicit_plot3d(z==y/2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='purple')

show(S1+S2+Ax+Ay+Az, aspect_ratio=[1,1,1])

I just wanted to execute the code, rotate the plot right from the graphics and export the image as a png file. This should by done by right-clicking on the plot and chosing export to png from the menu... Unfortunately, the output is a blank screen with just the string "Invalid JSmol request: saveFile" Any suggestion, please? I'm working with the OS X version, and I'm a total newbie... Thanks in advice, Mauro

 3 retagged tmonteil 23073 ●25 ●166 ●422 http://wiki.sagemath.o...

### How to export a plot to a jpg/png file

Hi everybody, I've got some problems with saving/exporting images. This is my code:

var ('x y z')

#Define a 3d curve as the intersection of 2 surfaces
#(but not explicit in z so we must use implicit plots)

# Let's plot
xmin=-3; xmax=3; ymin=-1; ymax=5; zmin=-3; zmax=3;

# Axes
Ax=line3d(([xmin,0,0],[xmax,0,0]), thickness=2, color='red')
Ay=line3d(([0,ymin,0],[0,ymax,0]), thickness=2, color='blue')
Az=line3d(([0,0,zmin],[0,0,zmax]), thickness=2, color='green')

# Surfaces
S1=implicit_plot3d(y==x^2+z^2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='yellow')
S2=implicit_plot3d(z==y/2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='purple')

show(S1+S2+Ax+Ay+Az, aspect_ratio=[1,1,1])

I just wanted to execute the code, rotate the plot right from the graphics and export the image as a png file. This should by done by right-clicking on the plot and chosing export to png from the menu... Unfortunately, the output is a blank screen with just the string "Invalid JSmol request: saveFile" Any suggestion, please? I'm working with the OS X version, and I'm a total newbie... Thanks in advice, Mauro

 4 retagged FrédéricC 3640 ●3 ●36 ●73

### How to export a plot to a jpg/png file

Hi everybody, I've got some problems with saving/exporting images. This is my code:

var ('x y z')

#Define a 3d curve as the intersection of 2 surfaces
#(but not explicit in z so we must use implicit plots)

# Let's plot
xmin=-3; xmax=3; ymin=-1; ymax=5; zmin=-3; zmax=3;

# Axes
Ax=line3d(([xmin,0,0],[xmax,0,0]), thickness=2, color='red')
Ay=line3d(([0,ymin,0],[0,ymax,0]), thickness=2, color='blue')
Az=line3d(([0,0,zmin],[0,0,zmax]), thickness=2, color='green')

# Surfaces
S1=implicit_plot3d(y==x^2+z^2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='yellow')
S2=implicit_plot3d(z==y/2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='purple')

show(S1+S2+Ax+Ay+Az, aspect_ratio=[1,1,1])

I just wanted to execute the code, rotate the plot right from the graphics and export the image as a png file. This should by done by right-clicking on the plot and chosing export to png from the menu... Unfortunately, the output is a blank screen with just the string "Invalid JSmol request: saveFile" Any suggestion, please? I'm working with the OS X version, and I'm a total newbie... Thanks in advice, Mauro