Question: a question about fishplot
gravatar for meizi2015
3 months ago by
meizi201520 wrote:

Hello All,

I want to use fishplot in R to draw a model picture like this:

Here is my code:



frac.table=matrix(c(2,0,0,3,1,0,50,40,2,90,75,30),ncol = length(timepoints))
parents = c(0,1,2)

fish = createFishObject(frac.table,parents,timepoints=timepoints)
fish = layoutClones(fish)
fish = setCol(fish,col=c("grey","lightpink","lightblue"))`

         cex.title=0.5,bg.type = 'solid',bg.col = c('white'))

But finally i get a picture :

I tried several times changing the matrix and the picture is still sunk in the middle and looks ugly. Can anyone tell me how to fix it?


R fishplot • 225 views
ADD COMMENTlink modified 3 months ago by Chris Miller20k • written 3 months ago by meizi201520

Are you able to reproduce their USAGE example ?

ADD REPLYlink written 3 months ago by Santosh Anand4.6k

Yes, I think i understand the example and i set my own timepoint, matrix and parents. The problem is that i can't get a roundish cruve in my picture. In timepoint 3 there is alaways a sunken and i don't know why.

ADD REPLYlink written 3 months ago by meizi201520
gravatar for Chris Miller
3 months ago by
Chris Miller20k
Washington University in St. Louis, MO
Chris Miller20k wrote:

That has to do with the way that the splining function is generating curves to fit your points. Unfortunately, the goals of having perfectly smooth curves and conforming precisely to the values you enter are mutually exclusive (or at least quite difficult!) If you want a perfectly smooth one, you can omit your middle timepoints and things should look smoother. Alternately, you can try adding additional, intermediate timepoints to smooth things out. As a final option, you can pull that plot into Illustrator (or Inkscape, etc) to try to tweak things manually.

ADD COMMENTlink written 3 months ago by Chris Miller20k

I should mention that you can also dig into the drawing code if you really want to tweak things. If you come up with useful options, pull requests are welcome!

ADD REPLYlink written 3 months ago by Chris Miller20k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 745 users visited in the last hour