comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Save some plots
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Save some plots [message #81929] Thu, 08 November 2012 23:30
Dick Jackson is currently offline  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 Go to previous message
Paul Van Delst[1] is currently offline  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 Go to previous message
d.poreh is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: change values of structure variable
Next Topic: Memory Allocation Problem- IDL 8.2

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 22:00:34 PDT 2025

Total time taken to generate the page: 0.16445 seconds