Any alternatives of "circle" ('o') symbol using New Graphics? [message #89164] |
Wed, 30 July 2014 00:16  |
stpjhj
Messages: 1 Registered: July 2014
|
Junior Member |
|
|
Hello,
I've been using DG for a couple of years, but recently I began to use NG.
Today, I needed to save a scatter plot of 20K data points in eps format. I marked each point with circular symbol, 'o'. IDL generated 54MB eps file in about 5 to 10 minutes.
I soon realised that this is due to the fact that each circular symbol has too many vertices, and if I change symbol into '+' it would yield a simple small 1.4MB eps file instantly.
So, would there be any alternative circular symbol that I can use like "p=plot(..., sym_object=foo(),...)" that does not make my plot file as large as a high-def music video?
Thanks in advance.
|
|
|
Re: Any alternatives of "circle" ('o') symbol using New Graphics? [message #89172 is a reply to message #89164] |
Wed, 30 July 2014 09:38   |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
On 07/30/14 03:16, stpjhj@gmail.com wrote:
> Hello,
>
> I've been using DG for a couple of years, but recently I began to use
> NG.
>
> Today, I needed to save a scatter plot of 20K data points in eps
> format. I marked each point with circular symbol, 'o'. IDL generated
> 54MB eps file in about 5 to 10 minutes. I soon realised that this is
> due to the fact that each circular symbol has too many vertices, and
> if I change symbol into '+' it would yield a simple small 1.4MB eps
> file instantly.
>
> So, would there be any alternative circular symbol that I can use
> like "p=plot(..., sym_object=foo(),...)" that does not make my plot
> file as large as a high-def music video?
>
> Thanks in advance.
What about a really thick dot?
E.g.
IDL> x=randomu(seed,20000)
IDL> y=randomu(seed,20000)
IDL> p=plot(x,y,linestyle='none',symbol='dot',sym_thick=4)
IDL> p.save,'test.eps'
IDL> $ls -l test.eps
-rw-r--r--. 1 wd20pd wd4 2532131 Jul 30 12:34 test.eps
Using a circle produces a 4-5x larger file:
IDL> p=plot(x,y,linestyle='none',symbol='circle')
IDL> p.save,'test.eps'
IDL> $ls -l test.eps
-rw-r--r--. 1 wd20pd wd4 11658936 Jul 30 12:34 test.eps
But use of + still wins for size:
IDL> p=plot(x,y,linestyle='none',symbol='+')
IDL> p.save,'test.eps'
IDL> $ls -l test.eps
-rw-r--r--. 1 wd20pd wd4 1506428 Jul 30 12:34 test.eps
cheers,
paulv
|
|
|
Re: Any alternatives of "circle" ('o') symbol using New Graphics? [message #89182 is a reply to message #89164] |
Thu, 31 July 2014 01:21  |
Fabzi
Messages: 305 Registered: July 2010
|
Senior Member |
|
|
Hi,
On 30.07.2014 09:16, stpjhj@gmail.com wrote:
> scatter plot of 20K data points in eps format
In a scatter plot of 20K+ points, a huge majority will probably not even
be visible. I know that it feels like "manipulating" data, but in this
case a random sample of e.g. 2000 points of data might look exact same
than the 20K points. Alternatively, you could also use pdf instead of eps:
IDL> x=randomu(seed,20000)
IDL> y=randomu(seed,20000)
IDL> p=plot(x,y,linestyle='none',symbol='o',sym_thick=4)
IDL> p.save,'test.eps'
IDL> p.save,'test.pdf'
IDL> $ls -lh test.eps
-rw-r--r-- 1 mowglie mowglie 12M Jul 31 10:19 test.eps
IDL> $ls -lh test.pdf
-rw-r--r-- 1 mowglie mowglie 5,1M Jul 31 10:19 test.pdf
|
|
|