Re: [Pharo-users] Named edges and nodes in a Roassal graph

2014-11-22 Thread Peter Uhnák
>
> Would be nice to have tools for all Roassal visualizations like export as
> svg. Some demos have them, some other don't, so other casual **users** has
> a bigger learning curve to adopt what they are seeing and use it in another
> context.

Roassal supports PNG, SVG and HTML export. What do you mean some demos have
them and some don't?


Re: [Pharo-users] Named edges and nodes in a Roassal graph

2014-11-22 Thread Peter Uhnák
Hmm, maybe that's the reason why there is separate class for ArrowedLine.

Essentially both RTElement and RTEdge has method 'model:'
(RTShapedObject>>model:) where you can put a string which is then used by
RTLabelled. (You can actually pass any object, but then you will have to
modify it to send it the proper message).

anyway, I modified your example:

| vista e1 e2 e3 e4 line edge1 edge2 |

"Se crea un objeto tipo vista"
vista := RTView new.

"Definimo los elementos, que denominamos simplemente e1, e2, etc, con
su color y su tamaño"
e1 := (RTEllipse new color: (Color blue alpha: 0.4); size: 20) elementOn:
'first'.
e2 := (RTEllipse new color: (Color red alpha: 0.4); size: 20) elementOn:
'second'.
e3 := (RTEllipse new color: (Color yellow alpha: 0.4); size: 20) elementOn:
'third'.
e4 := (RTEllipse new color: (Color green alpha: 0.4); size: 20) elementOn:
'fourth'.

"Decimos que los elementos antes definidos se podrán arrastrar"
vista add: e1; add: e2; add: e3; add: e4.

vista elements do: [ :each | each @ RTDraggable @ RTLabelled ].


"Adicionamos los elementos a la vista"

"Decimos qué propiedades va a tener la línea que los conecta los elementos"
line := RTArrowedLine  new color: Color red.
line withOffsetIfMultiple.

"Decimos de dónde a dónde van las líneas que unen los elementos en la vista"

edge1 := (line edgeFrom: e1 to: e2).
edge2 := (line edgeFrom: e3 to: e4) model: 'second label'.

vista add: edge1.
vista add: (line edgeFrom: e2 to: e1).
vista add: (line edgeFrom: e1 to: e2).
vista  add: (line edgeFrom: e2 to: e2).
vista  add: edge2.

edge1 @ (RTLabelled new text: 'edge label').
edge2 @ RTLabelled. "this uses the model of edge2"


"Decimos que dispocisión van a tener los elementos en la vista.
En este caso se van a disponer de manera circular"
RTCircleLayout on: { e1 . e2 . e3 . e4 }.

"Abrimos la vista"
vista open


On Sun, Nov 23, 2014 at 1:43 AM, Peter Uhnák  wrote:

> It seems there is an issue with the arrow head, I'll try to investigate it
>
> for now try running it without it
>
> ===
> v := RTView new.
>
> e1 := (RTEllipse new size: 20) elementOn: 'hello'.
> e2 := (RTEllipse new size: 20) elementOn: 'world'.
>
> e1 @ RTDraggable.
> e2 @ RTDraggable.
>
> l := RTEdge from: e1 to: e2.
> l + (RTLine new color: Color red).
> "l + (RTSimpleArrowHead new color: Color red)."
>
> e2 translateBy: 60 @ 80.
> v addAll: (Array with: e1 with: e2 with: l ).
>
> e1 @ RTLabelled.
> e2 @ RTLabelled.
>
> "Note that the RTLabelled interaction has to be set after having added the
> element in the view"
> l @ (RTLabelled new text: 'lining up!').
>
> v open
> =
>
> As far as documentation goes, it is still heavily work in progress, so
> right now Agile Visualization is probably the best source (and of course
> mailing list).
>
>


Re: [Pharo-users] Named edges and nodes in a Roassal graph

2014-11-22 Thread Offray Vladimir Luna Cárdenas

Hi Peter,

Thanks. Working now. I will try to solve the issue and post in the meet 
up and here on the list. Nice to help catching up the bug.


Offray

Ps: :

When I said

Would be nice to have tools for all Roassal visualizations like export 
as svg. Some demos have them, some other don't, so other casual issues 
has a bigger learning curve to adopt what they are seeing and use it in 
another context.


I mean:

Would be nice to have tools for all Roassal visualizations like export 
as svg. Some demos have them, some other don't, so other casual 
**users** has a bigger learning curve to adopt what they are seeing and 
use it in another context.




El 22/11/14 a las #4, Peter Uhnák escribió:

It seems there is an issue with the arrow head, I'll try to investigate it

for now try running it without it

===
v := RTView new.

e1 := (RTEllipse new size: 20) elementOn: 'hello'.
e2 := (RTEllipse new size: 20) elementOn: 'world'.

e1 @ RTDraggable.
e2 @ RTDraggable.

l := RTEdge from: e1 to: e2.
l + (RTLine new color: Color red).
"l + (RTSimpleArrowHead new color: Color red)."

e2 translateBy: 60 @ 80.
v addAll: (Array with: e1 with: e2 with: l ).

e1 @ RTLabelled.
e2 @ RTLabelled.

"Note that the RTLabelled interaction has to be set after having added the
element in the view"
l @ (RTLabelled new text: 'lining up!').

v open
=

As far as documentation goes, it is still heavily work in progress, so right now
Agile Visualization is probably the best source (and of course mailing list).






Re: [Pharo-users] Named edges and nodes in a Roassal graph

2014-11-22 Thread Peter Uhnák
It seems there is an issue with the arrow head, I'll try to investigate it

for now try running it without it

===
v := RTView new.

e1 := (RTEllipse new size: 20) elementOn: 'hello'.
e2 := (RTEllipse new size: 20) elementOn: 'world'.

e1 @ RTDraggable.
e2 @ RTDraggable.

l := RTEdge from: e1 to: e2.
l + (RTLine new color: Color red).
"l + (RTSimpleArrowHead new color: Color red)."

e2 translateBy: 60 @ 80.
v addAll: (Array with: e1 with: e2 with: l ).

e1 @ RTLabelled.
e2 @ RTLabelled.

"Note that the RTLabelled interaction has to be set after having added the
element in the view"
l @ (RTLabelled new text: 'lining up!').

v open
=

As far as documentation goes, it is still heavily work in progress, so
right now Agile Visualization is probably the best source (and of course
mailing list).


Re: [Pharo-users] Named edges and nodes in a Roassal graph

2014-11-22 Thread Offray Vladimir Luna Cárdenas

Hi,

El 22/11/14 a las #4, Peter Uhnák escribió:

Check out RTRoassalExample>>exampleArrowedAndLabelledLine , it should
demonstrate the functionality for both elements and edges. You can also use
TRConstraint, but that is a tad bit more advanced.

Peter



Thanks, I have seen it, but the demo is broken. When I move nodes the 
names and the text are moved, but the edge is not redrawn.


People in the workshop were interested in Roasal/Pharo but there where 
some important lessons:


- There is a lack of information on the basic issues (like this one). 
Agile Visualization is a good start as the Object Profile gallery, but 
we need more of that. This test case scenarios are useful in detecting 
the pending issues.
- Would be nice to have tools for all Roassal visualizations like export 
as svg. Some demos have them, some other don't, so other casual issues 
has a bigger learning curve to adopt what they are seeing and use it in 
another context.


I would like to post the working example on the meetup page, so if any 
can tell me why the example is broken or how to solve it, would be nice.


Cheers,

Offray



Re: [Pharo-users] Named edges and nodes in a Roassal graph

2014-11-22 Thread Peter Uhnák
Check out RTRoassalExample>>exampleArrowedAndLabelledLine , it should
demonstrate the functionality for both elements and edges. You can also use
TRConstraint, but that is a tad bit more advanced.

Peter


Re: [Pharo-users] Named edges and nodes in a Roassal graph

2014-11-22 Thread Offray Vladimir Luna Cárdenas
By the way, I have found exampleLabelledGraph but I don't understand 
where you add individual labels to nodes or edges.


Thanks,

Offray

El 22/11/14 a las #4, Offray Vladimir Luna Cárdenas escribió:

Hi all.

We're now in a small workshop about data narratives and I'm showing some
people Roassal.

I would like to have named nodes and edges in a graph. I have created a
small understable graph from the object profile gallery here:
http://ws.stfx.eu/8QMELFJ4V370

Anyone knows how to add names to edges and nodes in this graph?

If I could have a quick answer on this one would be awesome. By the way
I'm now 5:50 pm (GMT-5) in the pharo irc channel is someone pops up.

Thanks,

Offray







[Pharo-users] Named edges and nodes in a Roassal graph

2014-11-22 Thread Offray Vladimir Luna Cárdenas

Hi all.

We're now in a small workshop about data narratives and I'm showing some 
people Roassal.


I would like to have named nodes and edges in a graph. I have created a 
small understable graph from the object profile gallery here: 
http://ws.stfx.eu/8QMELFJ4V370


Anyone knows how to add names to edges and nodes in this graph?

If I could have a quick answer on this one would be awesome. By the way 
I'm now 5:50 pm (GMT-5) in the pharo irc channel is someone pops up.


Thanks,

Offray



Re: [Pharo-users] question on syntax "negate numbers"

2014-11-22 Thread Nicolai Hess
2014-11-22 13:23 GMT+01:00 Werner Kassens :

> >Thanks for all the answers,
> >so, for better portability, maybe we should dissallow opals current
> behavior
> >and only accept "-5" and not "- 5" as negative numbers?
>
> Hi Nicolai,
> perhaps. if you mean portability pharo->otherLanguage certainly. if you
> mean otherLanguage->pharo, well you are the specialist, i only know pharo
> and squeak as smalltalk dialects. of course you know that there exist
> non-OO-languages that return the same result as opal if you enter "1 + - 2
> -->-1". and of course i know that if i want to translate something from
> those other languages, deleting a  is the most simple of my problems.
>

portability pharo -> other smalltalk languages. Consider you have a library
that could be used on other smalltalk systems. And it just don't work
because there is a space between the number and the sign.



>
> changing the pov slightly, when do you have to enter a negative number in
> a program by hand? essentially only if you use that number as a constant
> (apart from tests of course). numbers are entered often automatically from
> outside files. ok, then you have those parsers that read in a string in a
> more flexible way. but wouldnt it make sense if the compiler reacts
> somewhat similar to those parsers? i for example do have a program, where
> the user, admittedly not a usual user but essentially me, enters simple
> inequalities (and here negative numbers are very common) as strings and the
> compiler eats those strings more or less directly without any additional
> parser put in between.
>
> i realize that with your reply you'd prefer a fact based argumentation and
> i readily admit that as a simple user, i see it simple stupid emotionally.
> if i understand pharo's history correctly, it came into existence because
> some language developers wanted more freedom. of course syntax controls
> thinking. i dont have any real problems if you disallow - 5, i use -5
> anyway, if it makes sense do it, you are the specialist. but what comes
> next? will everything you enter into nautilus automatically be
> pretty-printed? i understand that pharo has grown up now, and it makes
> complete sense to me that it wants to play with the big boys. perhaps you
> need a clear-cut simple structured syntax to get accepted by the business
> community, but not every businessman is a complete idiot and for example
> mathematica, which understands "1 + - 2", _is_ occasionally used to make
> some real money. i'd think about how far i'd wanna go with this thought
> control thing. so much  for my personal pov.
> werner
>
>
thank you werner, for your point of view.

If someone came up with a good reason why opals behavior is actually wrong,
I would change it. But I think now, it is not that important. We have much
more things with higher priority.


nicolai


Re: [Pharo-users] question on syntax "negate numbers"

2014-11-22 Thread Werner Kassens

>Thanks for all the answers,
>so, for better portability, maybe we should dissallow opals current 
behavior

>and only accept "-5" and not "- 5" as negative numbers?

Hi Nicolai,
perhaps. if you mean portability pharo->otherLanguage certainly. if you 
mean otherLanguage->pharo, well you are the specialist, i only know 
pharo and squeak as smalltalk dialects. of course you know that there 
exist non-OO-languages that return the same result as opal if you enter 
"1 + - 2 -->-1". and of course i know that if i want to translate 
something from those other languages, deleting a  is the most 
simple of my problems.


changing the pov slightly, when do you have to enter a negative number 
in a program by hand? essentially only if you use that number as a 
constant (apart from tests of course). numbers are entered often 
automatically from outside files. ok, then you have those parsers that 
read in a string in a more flexible way. but wouldnt it make sense if 
the compiler reacts somewhat similar to those parsers? i for example do 
have a program, where the user, admittedly not a usual user but 
essentially me, enters simple inequalities (and here negative numbers 
are very common) as strings and the compiler eats those strings more or 
less directly without any additional parser put in between.


i realize that with your reply you'd prefer a fact based argumentation 
and i readily admit that as a simple user, i see it simple stupid 
emotionally. if i understand pharo's history correctly, it came into 
existence because some language developers wanted more freedom. of 
course syntax controls thinking. i dont have any real problems if you 
disallow - 5, i use -5 anyway, if it makes sense do it, you are the 
specialist. but what comes next? will everything you enter into nautilus 
automatically be pretty-printed? i understand that pharo has grown up 
now, and it makes complete sense to me that it wants to play with the 
big boys. perhaps you need a clear-cut simple structured syntax to get 
accepted by the business community, but not every businessman is a 
complete idiot and for example mathematica, which understands "1 + - 2", 
_is_ occasionally used to make some real money. i'd think about how far 
i'd wanna go with this thought control thing. so much  
for my personal pov.

werner



Re: [Pharo-users] Maps from Wikipedia loaded on Roassal's RTMetricMap

2014-11-22 Thread Alexandre Bergel
Yesterday I've tried Cirela, impressive work! I have never thought Roassal 
could be pushed so far. 

Alexandre 



> Le 22-11-2014 à 6:04, Thierry Goubier  a écrit :
> 
> Hi Vladimir,
> 
> 2014-11-18 14:30 GMT+01:00 Offray Vladimir Luna Cárdenas :
>> 
>> Notice that this tries to be a leaner approach to the one I had already 
>> asked about importing maps from open street map.
> 
> Another option which you could look to is:
> 
> - use Cirela-OSM 
> (http://forum.world.st/ANN-NetGen-OSM-Roassal-Demo-tp4791158.html), which 
> will give you the OpenStreetMap background for any place / any zoom level
> 
> - and a combination of FreeBase, GeoJSON in a Roassal view
> 
> (See the geometry properties of freebase at: 
> http://www.freebase.com/location/location/geometry?schema=)
> 
> In Cirela-OSM, you will find examples of queries to FreeBase to retrieve 
> country / cities Lat/Lon coordinates and use them in Roassal. You also have 
> an example of querying raw OpenStreetMap data as well.
> 
> Good luck for your workshop.
> 
> Thierry
>  
>> 
>> Thanks,
>> 
>> Offray
> 


Re: [Pharo-users] Maps from Wikipedia loaded on Roassal's RTMetricMap

2014-11-22 Thread Thierry Goubier
Hi Vladimir,

2014-11-18 14:30 GMT+01:00 Offray Vladimir Luna Cárdenas 
:

>
> Notice that this tries to be a leaner approach to the one I had already
> asked about importing maps from open street map.
>

Another option which you could look to is:

- use Cirela-OSM (
http://forum.world.st/ANN-NetGen-OSM-Roassal-Demo-tp4791158.html), which
will give you the OpenStreetMap background for any place / any zoom level

- and a combination of FreeBase, GeoJSON in a Roassal view

(See the geometry properties of freebase at:
http://www.freebase.com/location/location/geometry?schema=)

In Cirela-OSM, you will find examples of queries to FreeBase to retrieve
country / cities Lat/Lon coordinates and use them in Roassal. You also have
an example of querying raw OpenStreetMap data as well.

Good luck for your workshop.

Thierry


>
> Thanks,
>
> Offray
>
>