forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hershey fonts available for Simpleplot
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions
View previous topic :: View next topic  
Author Message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Tue Sep 16, 2014 12:46 pm    Post subject: Reply with quote

Re- Diagnostic Messages

- the empty (zero file size) of the Error Messages file is related to the 'level' of error messages set I think.

The defaults are giving you no messages unless their biggy fall-over ones.

See p. 79-81 of Simpleplot Reference Manual for details of the 3 subroutine calls which would give you a higher messages detail. careful though as some options step through as the program executes like a debugger ! I suggest you try ea.ch one in turn to see the effects it has. I got messages on screen which I think are then saved when prompted in the on-screen messages window.
__________________________________________________

as for your exponentials size problem,

First - in your code the 'colour=#CC8800' makes it not run on my system for some reason, I got a run-time error, 'colour ***** is not recognized', I had to take it out (I put it to 'black').

Now, as you've seen from your revised code, changing the font can make a difference to the relative size of exponent. However, there's also another factor, that's that SimplePlot is 'very clever' (maybe too much for it's own good) and if the 'proportions of axes, label sizes, margins, titles, etc.... are too 'disproportionate' it re-scales one OR SEVERAL parts of the plot to give a plot which is more 'equilibrated. One offshoot of this can be that even though you try to increase the size of the font(s)§ to get the exponential bigger it actually has no effect on either since it is then 'scaled down again anyway in order to get an overall 'proportional' feel to the plot !
This means that one needs to be careful that, preferably, ALL the plots components are 'reasonabloy siězed and in proportion to the overall graph.

..................................................

... which brings us again to your first point !
What you ideally want (an update to %pl) would involve Silverfrost taking all that into account in the formulation of an 'updated %pl' command , and not just putting more options in there. At the end of the day, as we've said before on here, %pl is more or less just a command with some parameters which calls a load of Simpleplot CALLs to it's (i.e.SimplePlot's) subroutines, in the correct order , etc...

As Agustin has shown a couple of times now, using the base Simpleplot commands directly gives a lot of ways of improving the situation (i.e. workarounds) . I was looking at it too before the summer holidays and have worked out how to do varying GRID lines (between the tic marks) in Grey §for example with some success, but there are still some things to be ironed out , like strange effects on tic-mark lengths and thickness which occur (you can see something similar in the plots in your last example ! it's all a question of first understanding what Simpleplot does in cases like that first, and then working out the combinations of additional commands (to modify additional parameters). The FINAL step then being to get %pl updated to be more extensive !!! My understanding from previous discussions is that there is no chance of that at all. As currently I'm still a user of the evaluation version I have no complaints. I can however see the origin of frustrations of paying customers. I think the general feeling about plotting graphs in any program is based on the ehtos 'well if they want graphs they can always use Excel, which of course is true, except imo it doesn't help either wrt automation/standardisation not the time required to set the damn thing up as you want it, not to mention explaining it and (god forbid) documenting an Excel spreadsheet, and keeping track of versions 'modified' by others ! (we've all been there I'm sure) especially if there are loads of plots to be processed !!!
Vive FORTRAN !! FORTRAN is not dead, Long Live FORTRAN !!!
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Tue Sep 16, 2014 1:57 pm    Post subject: Reply with quote

Dan: are you using the Hershey fonts?....I get a nice plot from your code with a not so small exponent numbers......but I setup the Hershey fonts as I explained some messages up in this topic.....and if all runs well, you should produce as part of the Simpleplot output a file named MESSAGES.TXT containing a single line: "(SIMPLEPLOT Mark 2-15(015)D)"......this file, as far as I remember, provides information about the run of the Simpleplot subroutines....

If you already have the Simpleplot.ini file in the Windows folder and the Hershey.dat file in the same folder of Simple.dll, well.....then there is a problem......try to change the numbers in the call "call chset(10)", for instance to 20, and see what happens...if you still observe the same font, it means that the Hershey fonts were not installed in your system. With CHSET(10) you should get a slanted font....is this your case?

By the way (I didn't see the last message because I was writting mine), colour=#CC8800 works fine for me: I get some kind of light brown curve...is this correct?

Agustin
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Wed Sep 17, 2014 9:34 am    Post subject: Reply with quote

No, i do not see any files called Hershey on my computer.
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Wed Sep 17, 2014 1:41 pm    Post subject: Reply with quote

Dan,
I've just located an old version of the hershy files and uploaded them to:

norsoftdev.com/hershey.fnt
norsoftdev.com/hershey.htm

These are dated 12-May-1995 and 31-Jan-2002 respectively.

REgards
Ian
Back to top
View user's profile Send private message Send e-mail
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Wed Sep 17, 2014 1:46 pm    Post subject: Reply with quote

I suspected that!....Dan, please, go to the very first message of this topic. There you will see my instructions about how to install them and four or five messages below, you will see a message from Paul that indicates where to find the hershey.dat file as a zip file. Once you have installed them, let us know if you eventually get what you want (or at least more or less what you want considering the limitations of Simpleplot....).

Agustin
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Wed Sep 17, 2014 2:30 pm    Post subject: Reply with quote

I thought Dan had got the fonts sorted during the original discussions. Dan, maybe since then you've updated ftn95 and the fonts would not then be re-installed ? ... unless .....
Paul, does ftn95 now correctly include the Hershey fonts ???
.. .and don't forget the FTN95 Express update to 7.1 ,,, and those installation problems ! (for those machines not connected with internet and also Win7 install directory, etc...)

John
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Wed Sep 17, 2014 10:50 pm    Post subject: Reply with quote

I changes few hard drives lately and may lost hershey if I installed it (do not remember exactly, plus I was very reluctant to do that, Hershey never looked very good before, only deep despise of utterly bad Simpleplot %pl look which smells like DOS 1.1 may pushed me). The 7.1 definitely does not install that by default. The hack with not centered tic marks worked satisfactory without hershey. If better quality was needed i edited fonts, titles and axis marks by hand but was tired to do that lately with LOG scale. Will see what this new hack gives...thanks.

Meantime, can you post on Postimage dot org or other photo posting place screnshot of axis look from my program above?

How to remove creation of file MESSAGE.TXT? It either crashes %pl or after installing Hershey does not allow second instance of the code to run.

Update: something is still wrong. Changing font from 1 to 20 does not change anything a slightest bit. Same font.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Sep 18, 2014 5:51 am    Post subject: Reply with quote

Dan, see Agustin's original post at top of thread.
You need to create a .ini file and put in Windows directory as well as putting the Hershey.dat file in FTN95 folder !
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu Sep 18, 2014 8:00 am    Post subject: Reply with quote

I've done everything like it was written.
Plz post the image of same axis to compare and see if there is anything worth of trying further
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu Sep 18, 2014 5:31 pm    Post subject: Reply with quote

Hi Dan,
putting: CALL DIAGLV (0)
should eliminate the creation of the MESSAGES.TXT file.
Will upload the plot I get later when I've done a couple of variants.

John
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Sep 18, 2014 5:55 pm    Post subject: Reply with quote

using the following code:

Code:

Program simple

Real*8 x(100), y(100), z(100), u(100), v(100), w(100)
N=100
do i=1,N;
x(i)=i-1;
y(i)=sin(i/30.)**2;
z(i)=sin(i/30.)**5;
u(i)=sin(i/30.)**10;
v(i)=cos(i/30.)**10;
w(i)=sin(i/30.)**2 * cos(i/30.)**2;
enddo
CALL TEXTMN(0.3)
CALL AXLBJS('*C','C')
call thckmg('LINE',3.0)
call chset(20)
i=winio@('%ww%pv%pl[x_axis="Time [s]",y_axis=Amplitude,scale=log_linear,&     
   &title="U(red, green-analit), U_A on load(orange), I(blue, black-anal)", &
   & x_array, colour=red, colour=blue, colour=green, colour=black, &
   &colour=#CC8800, X_ARRAY, N_GRAPHS=5]&',&
   & 300, 200, N-4, x, y, z, u, v, w)
i=winio@('%ac[esc]', 'exit')
End


with CHSET(24) I get:

[img][/img][/code]

and with CHSET(20)

[img][/img]

see that I modified your original code for %pl by including a log scale in order to see the font in the case of logarithmic scales.....

As you can see the fine tunning of the plot should be done before calling %pl, almost every Simpleplot subroutine can be used before %pl to have a fine control of the plot. The Hershey fonts work as expected for Simpleplot. If you find that the font does not change by changing the argument in the CHSET subroutine, it means that either simpleplot.ini is not in your windows folder or/and hershey.dat file is not in the same folder of simpleplot.dll.

Hope this helps,

Agustin
Back to top
View user's profile Send private message
aebolzan



Joined: 06 Jul 2007
Posts: 229
Location: La Plata, Argentina

PostPosted: Thu Sep 18, 2014 8:35 pm    Post subject: Re: Reply with quote

John-Silver wrote:
Hi Dan,
putting: CALL DIAGLV (0)
should eliminate the creation of the MESSAGES.TXT file.
Will upload the plot I get later when I've done a couple of variants.

John


No, MESSAGES.TXT is a file created by Simpleplot by default and cannot be avoided (sorry Dan!). It is a diagnostic reporting file and the information included there will depend on the use or not of DIAGLV(0,1,2,3,4). If you put DIAGLV just before the call of %pl, and nothing wrong occurs, the file simply says that Simpleplot Mark 2-15 was opened. If you put DIAGLV before any call to Simpleplot subroutines, it should show every call to each subroutine or even the type of device (window, printer, etc. ) opened, if you do not use %pl, or the close of a plot or group of plots.

MESSAGES.TXT has therefore nothing to do with %pl, so that if %pl crashes is not because of the presence of that file, and the problem of a crash when trying to open the same %pl twice, is, from my point of view, a problem of %pl, not Simpleplot.

Respect to the installation of Hershey fonts, they are not installed by FTN95 because they are not included in the distribution as the Hershey.dat file was not in the hands of Silverfrost, and including it now I suspect would imply a modification of the installation procedure as it should also create and install a Simpleplot.ini file. FTN95 includes just the Simpleplot library as a kind of a present for those who needs to plot data without programming a lot, i.e. making plotting...simple. In this sense it is quite cheaper than buying a package of graphics subroutines for Fortran.....but has some limitations......at least till Mr. Silverfrost decides, or not, to update the library with the help of David Butland.....

I think that updating Simpleplot would make FTN95 an even more atractive product for customers because it would be a unique fortran compiler with the facilities of producing very nice Windows UI by means of Clearwin, and generate from simple to very complicated plotting graphs with minimum programing effort, by means of Simpleplot.

just my thoughts,

Agustin
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Fri Sep 19, 2014 7:03 am    Post subject: Reply with quote

1) Pity i have not mentioned that i changed the demo code to make exactly the same font size as in my axis example, because small and larger fonts harder to compare. Plus when post make sure that posting does not scale the image file. But anyway, the differences in these two examples exist while in any my attempts i do not see any.

2) How specifically do you compile?
3) What Windows do you use. Mine is 8.1
4) Do i need to reboot after those manipulations with installation of hershey? Probably not (and i can not reboot, too much is open on the computer)
5) any changes in environment variables?
6) please remind what makes font bold, italic and underlined

UPDATE
OK, forget all the above, i found the error. I missed preceding line with the keyword [general] being confused by the words "So I created a simple.ini file with only the statement". So the file has actually two statements and my always busy, always in the hurry, tired brain, always translating for me foreign English language too literally-- so i took just one line and omitted the less important one!

(As a sidenote, that's called NLP, neuro-linguistic programming. Smile All religions are based on NLP, specifically Christianity. After the Bible tells you on two-three pages hundreds of names "XXX lived 653 year and died. His son YYY lived 336 years and died. Son of his son ZZZ lived 890 years and died..." you are ready for further treatment and consumption and will believe in anything).

Indeed the exponent is larger, though of course the fonts look not good for all scalings, often terrible. Do you also see with font 1,2 the linewidth of plots also changes? But let's see if we find good looking font and good scaling. Yours above look not bad by the way

The only question left - please remind which option makes text bold and italic. Thanks
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Fri Sep 19, 2014 9:31 am    Post subject: Reply with quote

Re- MESSAGES.TXT - well for me it worked !

I added a line with CALL DIAGLV (0) and the MESSAGES file was not produced !

That doesn't mean of course it will solve the problem, but it just might.
Could just be a question of permissions on file creation of coiurse.

Not quite sure why you would want to run several versions at the same time mind Dan.
___________________________________________________

Re- FONTS .....

As for bold-italic Dan, you select the font with those built in !!
Hershey fonts tiitles are self-explanaztory -
see chpt. G3 of both:
a) Simpleplot Primer (gives a summary table of Hershey fonts)
and
b) Simpleplot Supplement (gives full vharacter sets for all the +ve CHSET fonts)
... both in FTN95 documentation on Silverfrost site.


Don't forget the 'normal fonts' (with -ve CHSET values) which are available:
CHSET (-1/-2/-3/-4) Courrier normal/bold/italic/bold-italic
CHSET (-5/-6/-7/-Cool Times
CHSET (-9/-10/-11/-12) Helvetica

[/img]
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Fri Sep 19, 2014 9:54 am    Post subject: Reply with quote

Thanks John,

That was another good hack! It now allows to run programs simultaneously. Multiple instances of same program are routinely running on my computer. Or just stay till i realize their results. It's like having multiple tabs in the browser.

And the advice of negative fonts was also good, i found the font which looks nice, but unfortunately it is italic. Italic layout hides pixelation of straight fonts.

Playing with Hershey rised the following obvious question:
do any antialised Hershey fonts exist in the nature? Why not, what's the problem? That would deliver high quality texts. There also exist a chance that on 4K monitors Hersheys will look without visible defects -- can anyone who has the latest tech try this source below on 4K monitors?

Here is the code for selection of best looking fonts/widths/charsets
Code:
!--------------------------------------------------------------------
 !  Compilation:
 !
 !ftn95 aaa.for /free /debug /undef
 !slink aaa.obj "c:\Program Files (x86)\Silverfrost\FTN95\SIMPLE.DLL"
 !
 ! With thanks to Agustin "Aebolzan" and John "John-Silver"
 !         of the Fortran forum forums.silverfrost.com
 !          for bringing almost dead Simpleplot to life
 !-------------------------------------------------------------------
 Program simple
 integer, external :: ActualPlotting

 real*8 TextSize
 integer LineWidth, iCharacterSetNo
 common /aaa/TextSize, LineWidth, iCharacterSetNo, LWindow

 TextSize = 0.41
 LineWidth = 4
 iCharacterSetNo=-11

 i=winio@('%ww&')
 i=winio@('%1tl&',16)
 i=winio@('%sp&',200,250)
 i=winio@('Text   size   %ta%df%6^rf%ff&', 1d-2, TextSize, ActualPlotting)
 i=winio@('Line Width %ta%dd%6^rd%ff&', 1, LineWidth, ActualPlotting)
 i=winio@('Charset  (-12 to +26)%ta%dd%6^rd%ff&', 1, iCharacterSetNo, ActualPlotting)
 i=winio@('%cn%^tt[Re-Plot]&',ActualPlotting)
 i=winio@('%ac[esc]', 'exit')
 end
!---------------------------------------------------------------------------
 integer function ActualPlotting ()

 real*8 TextSize
 integer LineWidth, iCharacterSetNo
 common /aaa/TextSize, LineWidth, iCharacterSetNo, LWindow


 Real*8 x(100), y(100), z(100), u(100), v(100), w(100)

 N=100
 A=20000 
 do i=1,N;
 x(i)=i-1;
 y(i)=A*sin(i/30.)**2;
 z(i)=A*sin(i/30.)**5;
 u(i)=A*sin(i/30.)**10;
 v(i)=A*cos(i/30.)**10;
 w(i)=A*sin(i/30.)**2 * cos(i/30.)**2;
 enddo

 CALL DIAGLV (0)
 CALL TEXTMN(sngl(TextSize)) ! 45)
 CALL AXLBJS('*C','C')
 call thckmg('LINE', float(LineWidth))
 call chset(iCharacterSetNo)

 LWindow = 0
 call window_update@(LWindow)

 i=winio@('%ww%pv%pl[x_axis="Time [s]",y_axis=Amplitude,&     
    &title="U(red, green-analit), U_A on load(orange), I(blue, black-anal)", &
    & colour=red, colour=blue, colour=green, colour=black, &
    &colour=#CC8800, X_ARRAY, SCALE=LOG_LINEAR, N_GRAPHS=5]&',&
    & 900, 600, N-4, x, y, z, u, v, w)
 i=winio@('%ac[esc]&', 'exit')
 i=winio@('%lw', LWindow)

 ActualPlotting = 2
 End function




Last edited by DanRRight on Sat Sep 20, 2014 11:48 am; edited 5 times in total
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Suggestions All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 3 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group