View previous topic :: View next topic |
Author |
Message |
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Mon Mar 13, 2017 8:20 am Post subject: |
|
|
I agreed Dan it does appear to be the line option is trying to smooth out the data. I've implemented a quick fix by passing the signal I'm plotting through a 1/(1+sT) transfer function (lag block) - basically a filter to round off the sharp changes. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Mon Mar 13, 2017 8:40 am Post subject: |
|
|
Yes I think that it is probably due to smoothing. If it is then I can add another "link" option that uses "poly-lines" instead. But that would remove the smoothing from the remainder of the graph. |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Mon Mar 13, 2017 9:18 am Post subject: |
|
|
Paul,
The help file says:- [link=lines] Join data points with straight lines (the default) which implies no smoothing (to me anyway). So I'm sure we need a new poly-line option - that's just joining the data points with straight lines.
The new %pl is really good - this is just a minor issue.
Ken |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Mon Mar 13, 2017 12:15 pm Post subject: |
|
|
This turned out to be a simple ClearWin+ programming error.
The two "link" options "lines" and "curves" were implemented the wrong way around.
You can check this out by using [link=curves] to see if it gives what you would like to see for "lines" but I will uploaded amended DLLs shortly. With these you would revert to your original coding. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Mon Mar 13, 2017 12:30 pm Post subject: |
|
|
Ken, Paul, By the way, which option makes the squared plotting region with two X and two Y axis like in the last plots (I still did not read the manuals)? |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Mon Mar 13, 2017 7:34 pm Post subject: |
|
|
Excellent Paul, Thank you for that. No overshoot in either of these curves now.
Dan, this code generated the plot above and points the way for multiple plots.
Code: | program step
implicit none
include<windows.ins>
integer i
real(kind=2), dimension(1:1000) :: time_plot, volt_plot, amps_plot
real(kind=2) delta_t, time
delta_t = 0.001d0
time = 0.d0
do i = 1, 1000
time_plot(i) = time
if (time .lt. 0.5d0) then
volt_plot(i) = 0.d0
else
volt_plot(i) = 1.d0
end if
if (time .lt. 0.25d0) then
amps_plot(i) = 0.d0
else
amps_plot(i) = exp(-time/0.5d0)
end if
time = time+delta_t
end do
i = winio@('%ww&')
CALL winop@("%pl[native]")
call winop@("%pl[x_array]")
call winop@("%pl[n_graphs=2]")
call winop@("%pl[link=lines]")
call winop@("%pl[x_axis='Time [s]']")
call winop@("%pl[y_axis='V [pu], I [pu]']")
call winop@("%pl[y_min=0.d0]")
call winop@("%pl[y_max=1.1d0]")
call winop@("%pl[dy=0.2d0]")
call winop@("%pl[width=2]")
call winop@("%pl[colour=red,colour=blue]")
i = winio@('%pl',400,400, 1000, time_plot, volt_plot, amps_plot)
end program step |
Regards
Ken |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Mon Mar 13, 2017 7:46 pm Post subject: |
|
|
Dan, Just read your question again.
You need to add
Code: | call winop@("%pl[framed]") |
before the winio call to %pl in the example code to get the box.
Ken |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Mon Mar 13, 2017 8:32 pm Post subject: |
|
|
Thanks, great that we start getting first Pros here in plotting subject.
Can new %p nowl set the frame line width, curves line width and font width for caption and axis all individually? |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Tue Mar 14, 2017 10:24 am Post subject: |
|
|
I'm confused again with the DLL's , here DLLs2 then DLL's 4 - I assume that they cumulative (i.e. 4 fixes both the /check problem and the overshoot correction ?
What happened to DLL's 1 and 3 ??? |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Tue Mar 14, 2017 10:27 am Post subject: |
|
|
Dan, I think these changes are just 'bug fixes' for Ken's specific problems. ;y understanding is that 'further development' is still on hold until the priorities swing around.
I'd suggest that what we need is a specific 'Native %pl Wish List' post where all 'desired' things can be gathered. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Tue Mar 14, 2017 11:09 am Post subject: |
|
|
John
There is a readme.txt in the download and, yes, the fixes are cumulative.
The initial aim was to replicate the ClearWin+ interface to SIMPLEPLOT and (apart from the odd fix) I think that has been achieved and more (log scaling has now been implemented but this feature has not yet been released).
There are no plans to go further with %pl. When we come back to this subject we will take a fresh look and maybe use a different approach to providing easy graphs.
I understand that this may be a disappointment but the subject is endless and we need to find a way to tap into existing code rather than write our own.
Don't forget to take a look at SIMDEM as an alternative. |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Wed Mar 15, 2017 9:15 am Post subject: |
|
|
ok, understood. Thanks Paul.
If the log scaling has been introduced already (a welcome surprise) , any idea when it will be released then ? maybe as a final DLL update in the short term ? |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Wed Mar 15, 2017 9:44 am Post subject: |
|
|
Look at these SIMDEM demos. I am surprised that their authors do not care what they show to the public if they want that their software was used.
http://www.simfit.org.uk/examples.html
All looks like plot demos were made on old DOS screens in 1993... no, 1987, with x-y plots quality being just a bit better then old ugly Simpleplot. None is suitable to any journal in the world. Add such bar chart into your grant solicitation and you'll probably loose. Make advertisements of your company with these 3D plots and all will laugh. May be these plots can be done much better but we have to see that in their ad, otherwise the first reaction is: old and ugly. Also look at their Fortran source codes of hundreds lines long. That is completely different ideology then we demand for %pl.
The new %pl already made a lot of improvement over Simpleplot and adding just few minor things may approach the ability to generate the production quality plots ***and*** ultimate ease at the same time.
In this case it may compete with MATLAB quality and simplicity plotting many use directly for major journals. This quality and being easy are key factors why people leave Fortran in favor of MATLAB. The new %pl has just to be customizable. Ideally it has to allow to gather all these numerous "call winop@" settings into one single line like "my_settings_1" to plot the production quality plots in one single line. |
|
Back to top |
|
|
Kenneth_Smith
Joined: 18 May 2012 Posts: 697 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Wed Mar 15, 2017 11:03 am Post subject: |
|
|
Dan,
This works as well - personally I prefer separate lines to make the code more readable.
Code: | CALL winop@("%pl[native,x_array,n_graphs=2,link=lines,x_axis='Time [s]']")
call winop@("%pl[y_axis='V [pu], I [pu]',y_min=0.d0,y_max=1.1d0,dy=0.2d0,width=2,colour=red,colour=blue]") |
Regards
Ken
[/code] |
|
Back to top |
|
|
|