|
From: hchiPer <hc...@gm...> - 2024-04-08 06:06:02
|
By the way, it could be safe to add
set output
before set terminal X11 to be certain that the png file is closed.
Le 7/04/24 à 12:52, igor via gnuplot-info a écrit :
> Thank you! I will try.
>
> You know, when I tried to run from the terminal
> gnuplot -p Well.plt
> everything went well.
>
> But usually I'm running this from the Fortran code, and there are only
> three lines regarding Gnuplot plot (and these three lines are the same
> in all my programs except for the names of data file and plt file):
>
> At the very beginning:
> character(len=*), parameter :: OUT_FILE = 'Well.txt' ! Output file.
> character(len=*), parameter :: PLT_FILE = 'Well.plt' ! Gnuplot
> file.
> The very last line:
> call execute_command_line('gnuplot -p ' // PLT_FILE)
>
> That's the only lines there which have any relations to Gnuplot.
> Fortran program writes data file and after that calls Gnuplot -
> and I'm again getting aforementioned error! More than that, in some
> cases I'm getting plot from 0 to 2.8, in some cases - from 0 to 2.5,
> for this particular data from 0 to 1.9 while always data file has a
> range from 0 to 3.12.
>
> So the reason looks like not in the Gnuplot itself - but may be you
> have any idea what it could be???
>
> *SORRY! I'VE FOUND THE REASON!*
>
> As always, it's very simple.
> The line to write data file is:
> write (fu, *) Pi*m/180.0, m !.....
>
> But this time I've forgot to put this line:
> close (fu)
> before calling Gnuplot.
>
> With this line everything is perfect.
> Sorry, sorry, sorry.
>
> Thank you very much for your attention!
> Igor
>
> 07.04.2024 13:06, theozh via gnuplot-info пишет:
>>
>> I cannot reproduce your issue.
>> Maybe you have set a certain xrange earlier?
>>
>> Either insert a line "reset session" at the beginning
>> or
>> change the plot command to
>>
>> plot [*:*][*:*] "Well.txt" using 1:2 with lines
>>
>> Am 07.04.2024 um 11:40 schrieb igor:
>>> Sorry, that's not the issue.
>>>
>>> The issue is that the X range in the data is from 0 to 3.12, but in
>>> the plot it is much shorter (about from 0 to 1.9)!
>>> Please don't take into account these additional columns, there was
>>> the same story when they existed - I've mentioned that I've
>>> simplified everything what I could.
>>>
>>> Igor
>>>
>>> 07.04.2024 12:25, theozh via gnuplot-info пишет:
>>>> Your data file has only 2 columns.
>>>> So, how should gnuplot be able to plot columns 4 and 5?
>>>>
>>>>
>>>> _______________________________________________
>>>> gnuplot-info mailing list
>>>> gnu...@li...
>>>> Membership management via:
>>>> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>>
>>
>> _______________________________________________
>> gnuplot-info mailing list
>> gnu...@li...
>> Membership management via:
>> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via:
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
|