Re: Save some plots [message #81929] |
Thu, 08 November 2012 23:30 |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
This will have been saving each one into a file named exactly as instructed, 'i.jpg', overwriting each time after the first. You want the value of variable 'i' to be put into the filename string, so your line to do the saving should be:
p.save, StrTrim(i, 2)+'.jpg'
Cheers,
-Dick
Dick Jackson Software Consulting
Victoria, BC, Canada
On Thursday, November 8, 2012 4:13:42 AM UTC-8, dave poreh wrote:
> for i = 0, 302162 do begin
> p = plot(x(*,i))
> p.save, 'i.jpg'
> endfor
>
> But, i need just to save these plots with the numbers like: 1.jpg, 2.jpg, ...
> Can someone help me please?
> Cheers,
> Dave
|
|
|
Re: Save some plots [message #81937 is a reply to message #81929] |
Thu, 08 November 2012 04:29  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
How do you convert an integer variable value into a character STRING()?
On 11/08/12 07:13, dave poreh wrote:
> Folks,
> I want to save some plots like this:
> file=dialog_pickfile()
> x=read_ascii(file)
> x=x.(0)
>
> for i = 0, 302162 do begin
> p = plot(x(*,i))
> p.save, 'i.jpg'
> endfor
>
> But, i need just to save these plots with the numbers like: 1.jpg, 2.jpg, ...
> Can someone help me please?
> Cheers,
> Dave
|
|
|
Re: Save some plots [message #84710 is a reply to message #81937] |
Thu, 08 November 2012 05:06  |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
On Thursday, November 8, 2012 1:29:19 PM UTC+1, Paul van Delst wrote:
> How do you convert an integer variable value into a character STRING()?
>
>
>
>
>
> On 11/08/12 07:13, dave poreh wrote:
>
>> Folks,
>
>> I want to save some plots like this:
>
>> file=dialog_pickfile()
>
>> x=read_ascii(file)
>
>> x=x.(0)
>
>>
>
>> for i = 0, 302162 do begin
>
>> p = plot(x(*,i))
>
>> p.save, 'i.jpg'
>
>> endfor
>
>>
>
>> But, i need just to save these plots with the numbers like: 1.jpg, 2.jpg, ...
>
>> Can someone help me please?
>
>> Cheers,
>
>> Dave
Thanks. Working like a charm,
Best,
Dave
|
|
|