Skip to main content
Notice removed Draw attention by CommunityBot
Bounty Ended with no winning answer by CommunityBot
Notice added Draw attention by MMA13
Bounty Started worth 100 reputation by MMA13
added 176 characters in body
Source Link
MMA13
  • 5.7k
  • 3
  • 17
  • 30

Exporting very dense DensityPlot or Plot3D figures as vectors (pdf, eps) become very huge in size. for example, exporting this fig as pdf gives 85MB in size

plot2d = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue] 

enter image description here

Is it possible to Rasterize only the plot profile without frames or labels such that when exporting as pdf they are still in vector form (frame and labels)?

and can it be done also for Plot3D (As I know labels can not be in vector style in Plot3D but at least can we Rasterize plot profile and Axes with labels independently? so we can assign high RasterSizeRasterize on labels and low for plot profile )

Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"] 

enter image description here

update

For DensityPlot the problem was solved in this answer. Now, we are left with the case of Plot3D, is it possible to do a similar thing as in DensityPlot?

i.e. I want to export the output of Plot3D as a vector style (pdf/eps) where only axes are in vector style and plot profile is arbitrary RasterSize in the background.

Exporting very dense DensityPlot or Plot3D figures as vectors (pdf, eps) become very huge in size. for example, exporting this fig as pdf gives 85MB in size

plot2d = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue] 

enter image description here

Is it possible to Rasterize only the plot profile without frames or labels such that when exporting as pdf they are still in vector form (frame and labels)?

and can it be done also for Plot3D (As I know labels can not be in vector style in Plot3D but at least can we Rasterize plot profile and Axes with labels independently? so we can assign high RasterSize on labels and low for plot profile )

Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"] 

enter image description here

update

For DensityPlot the problem was solved in this answer. Now, we are left with the case of Plot3D, is it possible to do a similar thing as in DensityPlot?

Exporting very dense DensityPlot or Plot3D figures as vectors (pdf, eps) become very huge in size. for example, exporting this fig as pdf gives 85MB in size

plot2d = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue] 

enter image description here

Is it possible to Rasterize only the plot profile without frames or labels such that when exporting as pdf they are still in vector form (frame and labels)?

and can it be done also for Plot3D (As I know labels can not be in vector style in Plot3D but at least can we Rasterize plot profile and Axes with labels independently? so we can assign high Rasterize on labels and low for plot profile )

Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"] 

enter image description here

update

For DensityPlot the problem was solved in this answer. Now, we are left with the case of Plot3D, is it possible to do a similar thing as in DensityPlot?

i.e. I want to export the output of Plot3D as a vector style (pdf/eps) where only axes are in vector style and plot profile is arbitrary RasterSize in the background.

added 291 characters in body
Source Link
MMA13
  • 5.7k
  • 3
  • 17
  • 30

exportingExporting very dense DensityPlot or Plot3D figures as vectors (pdf, eps) become very huge in size. for example, exporting this fig as pdf gives 85MB in size

plot2d = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue] 

enter image description here

Is it possible to Rasterize only the plot profile without frames or labels such that when exporting as pdf they are still in vector form (frame and labels)?

and can it be done also for Plot3D (As I know labels can not be in vector style in Plot3D but at least can we Rasterize plot profile and Axes with labels independently? so we can assign high RasterSize on labels and low for plot profile )

Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"] 

enter image description here

update

For DensityPlot the problem was solved in this answer. Now, we are left with the case of Plot3D, is it possible to do a similar thing as in DensityPlot?

exporting very dense DensityPlot or Plot3D figures as vectors (pdf, eps) become very huge in size. for example, exporting this fig as pdf gives 85MB in size

plot2d = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue] 

enter image description here

Is it possible to Rasterize only the plot profile without frames or labels such that when exporting as pdf they are still in vector form (frame and labels)?

and can it be done also for Plot3D (As I know labels can not be in vector style in Plot3D but at least can we Rasterize plot profile and Axes with labels independently? so we can assign high RasterSize on labels and low for plot profile )

Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"] 

enter image description here

Exporting very dense DensityPlot or Plot3D figures as vectors (pdf, eps) become very huge in size. for example, exporting this fig as pdf gives 85MB in size

plot2d = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue] 

enter image description here

Is it possible to Rasterize only the plot profile without frames or labels such that when exporting as pdf they are still in vector form (frame and labels)?

and can it be done also for Plot3D (As I know labels can not be in vector style in Plot3D but at least can we Rasterize plot profile and Axes with labels independently? so we can assign high RasterSize on labels and low for plot profile )

Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"] 

enter image description here

update

For DensityPlot the problem was solved in this answer. Now, we are left with the case of Plot3D, is it possible to do a similar thing as in DensityPlot?

Tweeted twitter.com/StackMma/status/1544018213046030339
added 70 characters in body
Source Link
MMA13
  • 5.7k
  • 3
  • 17
  • 30

exporting very dense DensityPlot or Plot3D figures as vectors (pdf, eps) become very huge in size. for example, exporting this fig as pdf gives 85MB in size

plot2d = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue] 

enter image description here

Is it possible to Rasterize only the plot profile without frames or labels such that when exporting as pdf they are still in vector form (frame and labels)?

and can it be done also for Plot3D (As I know labels can not be in vector style in Plot3D but at least can we Rasterize plot profile and Axes with labels independently? so we can assign high RasterSize on labels and low for plot profile )

Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"] 

enter image description here

exporting very dense DensityPlot or Plot3D figures as vectors (pdf, eps) become very huge in size. for example, exporting this fig as pdf gives 85MB in size

plot2d = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue] 

enter image description here

Is it possible to Rasterize only the plot profile without frames or labels such that when exporting as pdf they are still in vector form (frame and labels)?

and can it be done also for Plot3D (As I know labels can not be in vector style in Plot3D but at least can we Rasterize plot profile and Axes with labels independently? )

Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"] 

enter image description here

exporting very dense DensityPlot or Plot3D figures as vectors (pdf, eps) become very huge in size. for example, exporting this fig as pdf gives 85MB in size

plot2d = DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, FrameLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue] 

enter image description here

Is it possible to Rasterize only the plot profile without frames or labels such that when exporting as pdf they are still in vector form (frame and labels)?

and can it be done also for Plot3D (As I know labels can not be in vector style in Plot3D but at least can we Rasterize plot profile and Axes with labels independently? so we can assign high RasterSize on labels and low for plot profile )

Plot3D[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotPoints -> 200, LabelStyle -> {FontFamily -> "LM Roman 12", Black, FontSize -> 16}, AxesLabel -> (MaTeX[#, FontSize -> 17] &) /@ {"X", "Y"}, ImageSize -> 200, ColorFunction -> Hue, BoxRatios -> {1, 1, 2}, ViewPoint -> {1, -1.3, 0.5}, PlotTheme -> "Detailed"] 

enter image description here

edited tags
Link
MMA13
  • 5.7k
  • 3
  • 17
  • 30
Loading
Source Link
MMA13
  • 5.7k
  • 3
  • 17
  • 30
Loading