Options for Visualization

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Options for Visualization

Damir Majer
Hi,

I´m searching for Options to visualize diagrams, for example an class-diagram.
Is there an graphViz-Implementation in Pharo or better other Options to display Diagrams?
(here is the graphViz-Dot-Example:  
graph ethane {
     Car -- tire1 [type=s];
     Car -- tire2 [type=s];
     Car -- tire3 [type=s];
     Car -- tire4 [type=s];
 }

Thanks for routing me in the right direction!

Cheers,
Damir
--
Damir Majer
... be agile: www.majcon.de
cbc
Reply | Threaded
Open this post in threaded view
|

Re: Options for Visualization

cbc
Hi Damir,

In a recent copy of Moose, you can use Mondrian/Roassal to do similar visualizations.  As an example of how you could create a similar output to the GraphViz for your example data, you could try the following code in a workspace:

|view class|
view := ROMondrianViewBuilder new.
class := { 'Car' -> 'tire1'. 'Car' -> 'tire2'. 'Car' -> 'tire3'. 'Car' -> 'tire4'. }.
class do: [:e| view shape circle withText node: e value].
view shape circle withText node: class first key.
view
edgesFromAssociations: class;
treeLayout.
view open

I am sure there are better ways to handle this, but this is roughly what I've been using myself.  If you are working with class diagrams (or visualizing code), you should definitely look into importing the code into Moose itself, and utilizing its analysis tools - they are interesting and continue to evolve (and get more interesting).


-Chris


On Wed, Apr 17, 2013 at 8:59 AM, Damir Majer <[hidden email]> wrote:
Hi,

I´m searching for Options to visualize diagrams, for example an
class-diagram.
Is there an graphViz-Implementation in Pharo or better other Options to
display Diagrams?
(here is the graphViz-Dot-Example:
graph ethane {
     Car -- tire1 [type=s];
     Car -- tire2 [type=s];
     Car -- tire3 [type=s];
     Car -- tire4 [type=s];
 }

Thanks for routing me in the right direction!

Cheers,
Damir



-----
--
Damir Majer
... be agile: www.majcon.de
--
View this message in context: http://forum.world.st/Options-for-Visualization-tp4682144.html
Sent from the Moose mailing list archive at Nabble.com.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Options for Visualization

abergel
In reply to this post by Damir Majer
To parse graphViz-Dot files you probably want to write a small parser (regular expression is enough or you can use PetitParser).

To render the thing, use Roassal. Execute the following in a Workspace to load Roassal: 

Gofer new smalltalkhubUser: 'ObjectProfile' project: 'Roassal'; package: 'ConfigurationOfRoassal'; load. (Smalltalk at: #ConfigurationOfRoassal) project lastVersion load.


Open a workspace, and type:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view rawView data nodes|
rawView := ROView new.
view := ROMondrianViewBuilder view: rawView.
"-------------"
"-------------"

data := {
  'hello' -> 'world' .
  'world' -> 'earth' .
  'earth' -> 'mars' .
  'world' -> 'underworld' .
   'underworld' -> 'metallica' .
  'hello' -> 'bonjour' .
  'metallica' -> 'mars'
}.

nodes := data inject: Set new into: [ :set :assoc | set, (Set with: assoc key with: assoc value ) ].


view shape rectangle size: 15;
if: [ :el | #('metallica' 'underworld') includes: el ] borderColor: Color red.
view nodes:  nodes.

view shape arrowedLineWithOffset: 0.1.
view edges: data from: #key to: #value.
view radialTreeLayout.

"-------------"
"-------------"
ROEaselMorphic new populateMenuOn: view.
view open 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=




On Apr 17, 2013, at 11:59 AM, Damir Majer <[hidden email]> wrote:

Hi,

I´m searching for Options to visualize diagrams, for example an
class-diagram.
Is there an graphViz-Implementation in Pharo or better other Options to
display Diagrams?
(here is the graphViz-Dot-Example:  
graph ethane {
    Car -- tire1 [type=s];
    Car -- tire2 [type=s];
    Car -- tire3 [type=s];
    Car -- tire4 [type=s];
}

Thanks for routing me in the right direction!

Cheers,
Damir



-----
--
Damir Majer
... be agile: www.majcon.de
--
View this message in context: http://forum.world.st/Options-for-Visualization-tp4682144.html
Sent from the Moose mailing list archive at Nabble.com.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Options for Visualization

stephane ducasse
Hi alex 

what kind of music are you listening :)

Stef

On Apr 17, 2013, at 11:43 PM, Alexandre Bergel <[hidden email]> wrote:

To parse graphViz-Dot files you probably want to write a small parser (regular expression is enough or you can use PetitParser).

To render the thing, use Roassal. Execute the following in a Workspace to load Roassal: 

Gofer new smalltalkhubUser: 'ObjectProfile' project: 'Roassal'; package: 'ConfigurationOfRoassal'; load. (Smalltalk at: #ConfigurationOfRoassal) project lastVersion load.


Open a workspace, and type:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view rawView data nodes|
rawView := ROView new.
view := ROMondrianViewBuilder view: rawView.
"-------------"
"-------------"

data := {
  'hello' -> 'world' .
  'world' -> 'earth' .
  'earth' -> 'mars' .
  'world' -> 'underworld' .
   'underworld' -> 'metallica' .
  'hello' -> 'bonjour' .
  'metallica' -> 'mars'
}.

nodes := data inject: Set new into: [ :set :assoc | set, (Set with: assoc key with: assoc value ) ].


view shape rectangle size: 15;
if: [ :el | #('metallica' 'underworld') includes: el ] borderColor: Color red.
view nodes:  nodes.

view shape arrowedLineWithOffset: 0.1.
view edges: data from: #key to: #value.
view radialTreeLayout.

"-------------"
"-------------"
ROEaselMorphic new populateMenuOn: view.
view open 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=

<Screen Shot 2013-04-17 at 5.41.42 PM.png>


On Apr 17, 2013, at 11:59 AM, Damir Majer <[hidden email]> wrote:

Hi,

I´m searching for Options to visualize diagrams, for example an
class-diagram.
Is there an graphViz-Implementation in Pharo or better other Options to
display Diagrams?
(here is the graphViz-Dot-Example:  
graph ethane {
    Car -- tire1 [type=s];
    Car -- tire2 [type=s];
    Car -- tire3 [type=s];
    Car -- tire4 [type=s];
}

Thanks for routing me in the right direction!

Cheers,
Damir



-----
--
Damir Majer
... be agile: www.majcon.de
--
View this message in context: http://forum.world.st/Options-for-Visualization-tp4682144.html
Sent from the Moose mailing list archive at Nabble.com.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Options for Visualization

Damir Majer
Hi Chris, Hi Alexandre,

thanks for the examples. It helps me to choose the right Tools.

My intention is to start using pharo for data-/code visualization in SAP.
The long-term way is to write Importers for MOOSE, but in lack of knowledge and time I´m searching for the first (easy) steps to start with the visualization using pharo/moose.

Is it true, that Mondrian is currently used for visualization in moose but will be exchanged with Roassal?

Cheers,
Damir
--
Damir Majer
... be agile: www.majcon.de
Reply | Threaded
Open this post in threaded view
|

Re: Options for Visualization

Tudor Girba-2
Hi Damir,

Nice to see you on this mailing list :)

Yes, Mondrian will be replaced by Roassal. However, this transition will work pretty much out of the box (with perhaps a couple of little problems that will be fixed separately). It is already pretty much working.

What you can already do is:
- download the latest Moose image (btw, always develop on the latest Moose image)
- right click on the background, and choose RoassalEasel
- in there you can just use Mondrian scripts and they should work

Let us know if you have further problems.

Cheers,
Doru



On Thu, Apr 18, 2013 at 8:35 AM, Damir Majer <[hidden email]> wrote:
Hi Chris, Hi Alexandre,

thanks for the examples. It helps me to choose the right Tools.

My intention is to start using pharo for data-/code visualization in SAP.
The long-term way is to write Importers for MOOSE, but in lack of knowledge
and time I´m searching for the first (easy) steps to start with the
visualization using pharo/moose.

Is it true, that Mondrian is currently used for visualization in moose but
will be exchanged with Roassal?

Cheers,
Damir



-----
--
Damir Majer
... be agile: www.majcon.de
--
View this message in context: http://forum.world.st/Options-for-Visualization-tp4682144p4682250.html
Sent from the Moose mailing list archive at Nabble.com.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Options for Visualization

Damir Majer
Hi Doru,

yes step by step I became pharo/moose infected ;-)

Thanks for the info, it really helped!

Cheers from Munich,
Damir

Tudor Girba-2 wrote
Hi Damir,

Nice to see you on this mailing list :)

Yes, Mondrian will be replaced by Roassal. However, this transition will
work pretty much out of the box (with perhaps a couple of little problems
that will be fixed separately). It is already pretty much working.

What you can already do is:
- download the latest Moose image (btw, always develop on the latest Moose
image)
- right click on the background, and choose RoassalEasel
- in there you can just use Mondrian scripts and they should work

Let us know if you have further problems.

Cheers,
Doru



On Thu, Apr 18, 2013 at 8:35 AM, Damir Majer <[hidden email]> wrote:

> Hi Chris, Hi Alexandre,
>
> thanks for the examples. It helps me to choose the right Tools.
>
> My intention is to start using pharo for data-/code visualization in SAP.
> The long-term way is to write Importers for MOOSE, but in lack of knowledge
> and time I´m searching for the first (easy) steps to start with the
> visualization using pharo/moose.
>
> Is it true, that Mondrian is currently used for visualization in moose but
> will be exchanged with Roassal?
>
> Cheers,
> Damir
>
>
>
> -----
> --
> Damir Majer
> ... be agile: www.majcon.de
> --
> View this message in context:
> http://forum.world.st/Options-for-Visualization-tp4682144p4682250.html
> Sent from the Moose mailing list archive at Nabble.com.
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>



--
www.tudorgirba.com

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
Damir Majer
... be agile: www.majcon.de