MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Huge file for a several-line plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118598] Re: Huge file for a several-line plot
  • From: Dushan Mitrovich <dushanm at spinn.net>
  • Date: Wed, 4 May 2011 06:32:56 -0400 (EDT)

Heike Gramberg wrote:
> 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.
>    

Ah!  Thank you, your explanation makes a lot of sense.

While playing around with different ways of making these plots I noticed 
that my Bipolar coordinates don't seem to be identical to 
Mathematica's.  That is,  pt[v1,v2]  does not equal  xy[v2,v1] /. w->1  
for every [v1,v2].  I'll have to explore exactly what Mathematica uses 
for the Cartesian <-> Bipolar relationship.

- Dushan

> 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 ]
>>>>
>>>>          



  • Prev by Date: Re: Replacements and NIntegrate
  • Next by Date: Re: SortBy + Sort Strings with apo.marks + CharacterCode
  • Previous by thread: Re: Huge file for a several-line plot
  • Next by thread: Re: Huge file for a several-line plot