Graphics, Figures & TablesPSTricks | Other than linear Fitting

Information and discussion about graphics, figures & tables in LaTeX documents.
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

PSTricks | Other than linear Fitting

Post by svend_tveskaeg »

Hi all.

Is it possible to plot data and their fit if the latter is anything other than a linear function (see section 12.4 of the pst-plot manual for this)?

Thank you in advance!

P.S. I have found this post but I cannot figure out if it has been implemented in a package. Herbert has asked if he could put it into pst-func but the manual tells nothing of this as far as I can see.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

PSTricks | Other than linear Fitting

Post by CrazyHorse »

svend_tveskaeg wrote: Is it possible to plot data and their fit if the latter is anything other than a linear function (see section 12.4 of the pst-plot manual for this)?

P.S. I have found this post but I cannot figure out if it has been implemented in a package. Herbert has asked if he could put it into pst-func but the manual tells nothing of this as far as I can see.
install http://texnik.dante.de/tex/latex/pst-fit/pst-fit.sty
and http://texnik.dante.de/tex/generic/pst-fit/pst-fit.tex

don't know why it is not on CTAN.
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: PSTricks | Other than linear Fitting

Post by svend_tveskaeg »

Sweet!

If you create a manual, please let us know. ;)
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

PSTricks | Other than linear Fitting

Post by CrazyHorse »

svend_tveskaeg wrote: If you create a manual, please let us know. ;)
http://texnik.dante.de/doc/generic/pst-fit/

it is not forbidden to browse through the directories ... ;-)
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: PSTricks | Other than linear Fitting

Post by svend_tveskaeg »

Do'h! I completely missed this subdirectory. :oops:
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: PSTricks | Other than linear Fitting

Post by svend_tveskaeg »

By the way, is it possible to print the expression for the fitted curve and the correlation coefficient in mathmode? Furthermore, can the order of the terms in the printed expression be reversed?

Thank you in advance.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

PSTricks | Other than linear Fitting

Post by CrazyHorse »

svend_tveskaeg wrote:By the way, is it possible to print the expression for the fitted curve and the correlation coefficient in mathmode? Furthermore, can the order of the terms in the printed expression be reversed?
sure, but it needs a rewrite of the macros ...
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: PSTricks | Other than linear Fitting

Post by svend_tveskaeg »

Okay. I will give it a try tomorrow and post what I come up with.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

PSTricks | Other than linear Fitting

Post by svend_tveskaeg »

This is not exactly going well. :?

First: The data file data.dat is attached.

I have tried to alter line 805 from

Code: Select all

  PolyEq { (y =) show
to

Code: Select all

  PolyEq { ($y =$) show
but then I just get the output in the attached picture.

Update
If it is not trivial to convert the printed output in math mode and reverse the order of the terms, it is hereby a request for the next version of the package. ;)
Attachments
data.dat
Data file.
(80 Bytes) Downloaded 437 times
New output after altered code.
New output after altered code.
new-code_output.png (6.87 KiB) Viewed 7753 times
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

PSTricks | Other than linear Fitting

Post by svend_tveskaeg »

CrazyHorse wrote:don't know why it is not on CTAN.
tlmgr tells me that it is now!
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply