Hi Hernan,
1) You can see the result in the TR Morph.png attached file. In X axis, how can set up a tick every certain step value? For example, every 50 points. Right now this is 88, 176, 264, 353 and I would like to be 50, 100, 150, 200, 250, 300, 350, 400.
you can use message #shouldUseNiceLabelsForX:, this enables RTGrapher to use RTLabelGenerator, that uses nice labels for these cases.
.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.= | b ds | b := RTGrapher new.
ds := RTData new. ds points: RTShape withAllSubclasses. ds y: #numberOfMethods. b add: ds.
b addDecorator: RTVerticalMinValueDecorator new red. b addDecorator: RTVerticalMaxValueDecorator new blue.
b shouldUseNiceLabelsForX: true. b axisY noLabel. b axisX noDecimal; numberOfTicks: 10; numberOfLabels: 10. b build. ^ b view .=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.= [image: Captura de pantalla 2018-10-08 a la(s) 19.08.10.png] 2) I just plotted a very short toy DNA sequence, however if I would like to plot GC skew for E.coli that would take hundreds of points. The following script takes ages to complete or it never ends. You will find attached the necessary files:
| grapher ds eColiGCSkew zipArchive |
zipArchive := ZipArchive new. [ zipArchive readFrom: 'ecoligcskew.zip' asFileReference; extractAllTo: '.' asFileReference ] ensure: [ zipArchive close ]. eColiGCSkew := FLMaterializer materializeFromFileNamed: 'OrderedCollection_3712516797.obj'. eColiGCSkew := eColiGCSkew copyFrom: 1 to: 20000. grapher := RTGrapher new extent: 800 @ 500; yourself. ds := RTData new points: { 0@ -1000. eColiGCSkew size@ 1000}; y: #y; x: #x; yourself. grapher add: ds.
grapher addDecorator: (RTAreaDecorator new points: eColiGCSkew; color: Color orange trans). grapher shouldUseNiceLabelsForX: true. grapher axisY minValue: eColiGCSkew min; title: 'Skew'; color: Color black; noDecimal. grapher axisX numberOfTicks: 10; noDecimal; color: Color black; title: 'Position'. grapher
[image: Captura de pantalla 2018-10-09 a la(s) 18.26.14.png]
The eColiGCSkew is an array of 4 millon points, this in roassal creates 4 millon instances of RTElement of one ellipse. For this script I have used RTAreaDecorator, that creates a single instance of RTSVGPath, with a lot of commands that Athens can read and creates. But in this case you can:
- create a SVG with all the points, and add it to the grapher. like RTAreaDecorator. - Draw on the same canvas: roassal in TRMorph uses a Surface to draw the elements, I think that you reuse this surface to draw each dot with one roassal shape, in order to get this kind of draw over the time(the time that takes to iterate the 4 millon points) https://www.openprocessing.org/sketch/604265
Cheers, Milton
El jue., 4 oct. 2018 a las 0:49, Hernán Morales Durand (< hernan.morales@gmail.com>) escribió:
This is weird, could you check:
http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2018-October/04...
Hernán
El mié., 3 oct. 2018 a las 22:41, Alexandre Bergel (alexandre.bergel@me.com) escribió:
I am lost. What are the questions? I do not see them in the mailing list.
Alexandre
On Oct 3, 2018, at 11:11 AM, Hernán Morales Durand <
hernan.morales@gmail.com> wrote:
Hi Alex,
Thanks. Please note there are two questions related to Roassal :) I have isolated the script so you don't need to load BioSmalltalk
Maybe someone can check or give a hint?
El mar., 2 oct. 2018 a las 22:31, Alexandre Bergel (alexandre.bergel@me.com) escribió:
Pretty cool!
Alexandre
On Oct 2, 2018, at 2:21 AM, Hernán Morales Durand <
hernan.morales@gmail.com> wrote:
<a TRMorph(28411392).png><skew_diagram_ecoli.png>
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev