Re: Huge file for a several-line plot
- To: mathgroup at smc.vnet.net
- Subject: [mg118573] Re: Huge file for a several-line plot
- From: Heike Gramberg <heike.gramberg at gmail.com>
- Date: Tue, 3 May 2011 05:46:52 -0400 (EDT)
I think the problem is that you're varying both s and t for each of the curves. Since
the curves either depend on s or on t but not both you're effectively plotting at least
PlotPoints copies of the same set of curves on top of each other. To correct this you could plot
the curves for s is constant and t is constant separately and then combine them with Show:
Show[{ParametricPlot[
Table[xy[i/4, t], {i, 1, 10}] /. w -> 1, {t, -Pi, Pi},
PlotPoints -> 30],
ParametricPlot[
Table[xy[s, \[Pi]/6*j], {j, 0, 11}] /. w -> 1, {s, 0, 10},
PlotPoints -> 30]}, PlotRange -> {{0, 4.2}, {-2, 2}}]
On my machine that produces a file of 184 kB.
Heike.
On 2 May 2011, at 18:23, Dushan Mitrovich wrote:
> Heike Gramberg wrote:
>> How are you plotting the graphs? If I use the following:
>>
>> pt[s_, t_] := CoordinatesToCartesian[{s, t, 0}, Bipolar][[{1, 2}]]
>>
>> ParametricPlot[pt[s, t], {s, 0, 2 Pi}, {t, -5, 5},
>> PlotRange -> {{-10, 10}, {-8, 8}}, Mesh -> 22,
>> PlotStyle -> Opacity[0], MeshStyle -> Darker[Gray],
>> PlotPoints -> 100, ImageSize -> 600]
>>
>> I end up with a file of about 631 kB on Mathematica 8.0.1 for OS X.
>>
>> Heike
>>
>
> That size is a lot more reasonable, especially for a much larger value of
> 'PlotPoints' than I used.
>
> Here are the instructions I used (the first two could be lumped into one):
>
> {x[s_, t_], y[s_, t_]} := {(w Sinh[s])/(Cosh[s] + Cos[t]),
> (w Sin[t])/(Cosh[s] + Cos[t])}
>
> xy[s_, t_] := {x[s, t], y[s, t]}
>
> ParametricPlot[{Table[xy[i/4, t], {i, 1, 10}] /. w->1,
> Table[xy[s, \[Pi]/6*j], {j, 0, 11}] /. w -> 1}, {s, 0., 10},
> {t, -\[Pi], \[Pi]}, PlotRange -> {{0, 4.2}, {-2, 2}}, PlotPoints -> 30]
>
> Comparing with your sample instructions above, I didn't recognize anything
> as a crucial difference. Suggestions?
>
> - Dushan
>
>> On 2 May 2011, at 11:51, Dushan Mitrovich wrote:
>>
>>> I wanted to plot a number of the orthogonal coordinate lines of a
>>> Bi-polar coordinate system - a total of 22 curves. All the curves
>>> are circles. With PlotPoints unspecified, some of the circles had
>>> polygonal parts, so to eliminate this I added the option PlotPoints->50.
>>> That took a long time to plot (on a 4-CPU Mac Pro),
>>> and generated a notebook size of 10.5 MB. (Using PlotPoints->30 drops
>>> the size to 4.5 MB.)
>>>
>>> With that plot cell deleted the size is 53 KB. The file labels
>>> the graphic as 'CompressedData', but there simply isn't that much
>>> information in the plot. It's as tho Mathematica were storing every
>>> pixel of the plot, with very inefficient compression.
>>>
>>> With that plot the spinning beachball (computer busy) would appear
>>> every few seconds, and it was impossible to alter the graphic size.
>>>
>>> How can I instruct Mathematica to make more sensible choices for
>>> generating and storing the plot?
>>>
>>> - Dushan
>>> [ reverse the middle word of address to reply ]
>>>
>>>
>>
>>
>>
>