Prev: Absolute value
Next: numerical integration
From: divisor on 28 Jun 2010 02:29 Hello MathGroup: I am making some plots and exporting high-resolution JPEGs from them. But the AxesLabel and PlotLabels are not "scaled"ed with the desired resolution. As a result, although the graphic is "large", the user must scroll in to read the labels. Has anyone had this problem and/or found a workaround? Here is a simple test case using a Documentation Center-supplied example: f[x_, y_] := x^2 + y^2 g[x_, y_] := -x^2 - y^2 h[q, r, s] := Function[{q, r, s}, q^2 + r^2 <= 4] Plot3D[{f[q, r], g[q, r]}, {q, -2, 2}, {r, -2, 2} , RegionFunction -> h[q, r, s] , BoxRatios -> Automatic , AxesLabel -> {q, r} , PlotLabel -> Style[ToString(a)TraditionalForm@f[q, r] <> " and " <> ToString(a)TraditionalForm@g[q, r] <> "\n constrained by " <> ToString(a)TraditionalForm@h[q, r, s] , Blue, Italic, 18] ] Export[ "C:\\Users\\toshW7_0611\\Documents\\iConecto\\dzcMmaT3.jpg" , %6, "JPEG" , ImageSize -> {3000, 2000} , ImageResolution -> 300 ] TIA. Regards.. Roger Williams Franklin Laboratory
From: telefunkenvf14 on 30 Jun 2010 01:48 On Jun 28, 1:29 am, divisor <congruentialumina...(a)yahoo.com> wrote: > Hello MathGroup: > > I am making some plots and exporting high-resolution JPEGs from them. > But the AxesLabel and PlotLabels are not "scaled"ed with the desired > resolution. As a result, although the graphic is "large", the user > must scroll in to read the labels. > > Has anyone had this problem and/or found a workaround? Here is a > simple test case using a Documentation Center-supplied example: > > f[x_, y_] := x^2 + y^2 > g[x_, y_] := -x^2 - y^2 > h[q, r, s] := Function[{q, r, s}, q^2 + r^2 <= 4] > > Plot3D[{f[q, r], g[q, r]}, {q, -2, 2}, {r, -2, 2} > , RegionFunction -> h[q, r, s] > , BoxRatios -> Automatic > , AxesLabel -> {q, r} > , PlotLabel -> > Style[ToString(a)TraditionalForm@f[q, r] <> " and " <> > ToString(a)TraditionalForm@g[q, r] <> "\n constrained by " <> > ToString(a)TraditionalForm@h[q, r, s] > , Blue, Italic, 18] > ] > > Export[ > "C:\\Users\\toshW7_0611\\Documents\\iConecto\\dzcMmaT3.jpg" > , %6, "JPEG" > , ImageSize -> {3000, 2000} > , ImageResolution -> 300 > ] > > TIA. > > Regards.. > > Roger Williams > Franklin Laboratory (1) I'd use a different format, if at all possible. JPEG = lossy. If it has to be an image file, PNG would probably be better. (2) Try adjusting the LabelStyle and TicksStyle pts. Rasterize[ Plot3D[{f[q, r], g[q, r]}, {q, -2, 2}, {r, -2, 2}, RegionFunction -> h[q, r, s], BoxRatios -> Automatic, AxesLabel -> {q, r}, LabelStyle -> Directive[Black, 36], TicksStyle -> Directive[Black, 36], PlotLabel -> Style[ToString(a)TraditionalForm@f[q, r] <> " and " <> ToString(a)TraditionalForm@g[q, r] <> "\n constrained by " <> ToString(a)TraditionalForm@h[q, r, s], Blue, Italic, 48]], ImageSize -> {3000, 2000}, ImageResolution -> 300] Export["C:\\Users\\x61Tablet\\Desktop\\dzcMmaT3.jpg", %, "JPEG", "CompressionLevel" -> .25] (*lower compression for better quality...*) -RG
From: Sjoerd C. de Vries on 30 Jun 2010 01:50 Hi Roger, You could use a Scaled font size instead of an absolute fontsize. Replacing 18 with something like FontSize -> Scaled[0.06] works for me. Another possibility is to scale the font size by 300/72, where 300 is the resolution you used and 72 pixels per printer point is the size used for font sizes. So you would use 18 300/72. Cheers -- Sjoerd On Jun 28, 8:29 am, divisor <congruentialumina...(a)yahoo.com> wrote: > Hello MathGroup: > > I am making some plots and exporting high-resolution JPEGs from them. > But the AxesLabel and PlotLabels are not "scaled"ed with the desired > resolution. As a result, although the graphic is "large", the user > must scroll in to read the labels. > > Has anyone had this problem and/or found a workaround? Here is a > simple test case using a Documentation Center-supplied example: > > f[x_, y_] := x^2 + y^2 > g[x_, y_] := -x^2 - y^2 > h[q, r, s] := Function[{q, r, s}, q^2 + r^2 <= 4] > > Plot3D[{f[q, r], g[q, r]}, {q, -2, 2}, {r, -2, 2} > , RegionFunction -> h[q, r, s] > , BoxRatios -> Automatic > , AxesLabel -> {q, r} > , PlotLabel -> > Style[ToString(a)TraditionalForm@f[q, r] <> " and " <> > ToString(a)TraditionalForm@g[q, r] <> "\n constrained by " <> > ToString(a)TraditionalForm@h[q, r, s] > , Blue, Italic, 18] > ] > > Export[ > "C:\\Users\\toshW7_0611\\Documents\\iConecto\\dzcMmaT3.jpg" > , %6, "JPEG" > , ImageSize -> {3000, 2000} > , ImageResolution -> 300 > ] > > TIA. > > Regards.. > > Roger Williams > Franklin Laboratory
|
Pages: 1 Prev: Absolute value Next: numerical integration |