Discussion:
SaveAs with different layers?
Georg Troska
2014-10-20 13:35:03 UTC
Permalink
Hi,

I'm thinking about using the SaveAs function of TCanvas to show some
Charts as gifs in the web.
Do you think it would be possible to use imageformats that support layers
to activate or deactivate some content.

For example, if I am showing in a TGraph ten different trendlines, the
whole chart will be a lot overloaded, if I could put the axis in one layer
and each trendline in an own layer I would have the possibility to select
different layers of the Image. I could show axis+trends1,2,3 and so on.

Of course I Need to find a way to select the layers i wont to show in
Firefox as well :-)

Is there a way?

Georg
André Rummler
2014-10-20 13:59:40 UTC
Permalink
Post by Georg Troska
I'm thinking about using the SaveAs function of TCanvas to show some
Charts as gifs in the web.
Do you think it would be possible to use imageformats that support layers
to activate or deactivate some content.
For example, if I am showing in a TGraph ten different trendlines, the
whole chart will be a lot overloaded, if I could put the axis in one layer
and each trendline in an own layer I would have the possibility to select
different layers of the Image. I could show axis+trends1,2,3 and so on.
Of course I Need to find a way to select the layers i wont to show in
Firefox as well :-)
Hello,

I think it is easier to achieve this using the svg output format. Then
you can either activate/deactivate layer using css:
http://hofmannsven.com/2013/laboratory/svg-stacking/
or let the user do it interactively using e.g. check boxes:
https://developers.arcgis.com/javascript/jssamples/map_explicitlayerlist.html
(uses some JavaScript library but there are certainly a lot of ways to
realise this kind of behaviour).

André
--
L.A.P.P. ***@lapp.in2p3.fr
Dr. André Rummler phone: +33 4 50 09 16 23
9 Chemin de Bellevue
BP 110 F-74941 Annecy-le-Vieux CEDEX mobile: +49 176 51262211
FRANCE skype: andrerummler1
Sergey Linev
2014-10-20 14:01:58 UTC
Permalink
Dear Georg,

There is another alternative to display ROOT canvas in web browser.
It can be done with JavaScript ROOT like:

http://web-docs.gsi.de/~linev/js/3.0/files/fileitem.htm?file=zdemo.root&item=zdemo;1

Such page can be inserted into any webpage with <IFRAME src="..."></IFRAME> tag.

Regards,
Sergey
Post by Georg Troska
Hi,
I'm thinking about using the SaveAs function of TCanvas to show some
Charts as gifs in the web.
Do you think it would be possible to use imageformats that support layers
to activate or deactivate some content.
For example, if I am showing in a TGraph ten different trendlines, the
whole chart will be a lot overloaded, if I could put the axis in one layer
and each trendline in an own layer I would have the possibility to select
different layers of the Image. I could show axis+trends1,2,3 and so on.
Of course I Need to find a way to select the layers i wont to show in
Firefox as well :-)
Is there a way?
Georg
--
Dr. Sergey Linev Mail: ***@gsi.de
GSI, Experiment Elektronik Phone: +49-6159-71-1338
Planckstr. 1, 64291 Darmstadt FAX: +49-6159-71-2986

GSI Helmholtzzentrum für Schwerionenforschung GmbH
Sitz der Gesellschaft: Darmstadt
Handelsregister: Amtsgericht Darmstadt, HRB 1528

Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, Dr.-Ing. Jürgen Henschel
Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph
Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt
Georg Troska
2014-10-20 15:53:09 UTC
Permalink
Hi Sergey, Andre, dear Rooters,

I knew about the JavaScript-Stuff before, but what I read from the root
webpage was that the only working version runs the with Root 3.something
only. So it's rather old. :-) Unfortunately I was not able to run the
download-files. Do you have a newer Versions. I would definetely prefer
this solution.

thanks to Andre, this was exactly what I was searching for. Do you know
how to build be layers in root? So how to put the elements of one graph
into one layer?

Georg
Post by Sergey Linev
Dear Georg,
There is another alternative to display ROOT canvas in web browser.
http://web-docs.gsi.de/~linev/js/3.0/files/fileitem.htm?file=zdemo.root&item=zdemo;1
Such page can be inserted into any webpage with <IFRAME
src="..."></IFRAME> tag.
Regards,
Sergey
Post by Georg Troska
Hi,
I'm thinking about using the SaveAs function of TCanvas to show some
Charts as gifs in the web.
Do you think it would be possible to use imageformats that support layers
to activate or deactivate some content.
For example, if I am showing in a TGraph ten different trendlines, the
whole chart will be a lot overloaded, if I could put the axis in one layer
and each trendline in an own layer I would have the possibility to select
different layers of the Image. I could show axis+trends1,2,3 and so on.
Of course I Need to find a way to select the layers i wont to show in
Firefox as well :-)
Is there a way?
Georg
--
GSI, Experiment Elektronik Phone: +49-6159-71-1338
Planckstr. 1, 64291 Darmstadt FAX: +49-6159-71-2986
GSI Helmholtzzentrum für Schwerionenforschung GmbH
Sitz der Gesellschaft: Darmstadt
Handelsregister: Amtsgericht Darmstadt, HRB 1528
Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, Dr.-Ing. Jürgen Henschel
Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph
Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt
Axel Naumann
2014-10-20 15:55:33 UTC
Permalink
Hi Georg,
Post by Georg Troska
what I read from the root
webpage was that the only working version runs the with Root
3.something only.
Where do we say that; do you have a link?

Cheers, Axel
Post by Georg Troska
Hi Sergey, Andre, dear Rooters,
I knew about the JavaScript-Stuff before, but what I read from the root
webpage was that the only working version runs the with Root 3.something
only. So it's rather old. :-) Unfortunately I was not able to run the
download-files. Do you have a newer Versions. I would definetely prefer
this solution.
thanks to Andre, this was exactly what I was searching for. Do you know
how to build be layers in root? So how to put the elements of one graph
into one layer?
Georg
Post by Sergey Linev
Dear Georg,
There is another alternative to display ROOT canvas in web browser.
http://web-docs.gsi.de/~linev/js/3.0/files/fileitem.htm?file=zdemo.root&item=zdemo;1
Such page can be inserted into any webpage with <IFRAME
src="..."></IFRAME> tag.
Regards,
Sergey
Post by Georg Troska
Hi,
I'm thinking about using the SaveAs function of TCanvas to show some
Charts as gifs in the web.
Do you think it would be possible to use imageformats that support layers
to activate or deactivate some content.
For example, if I am showing in a TGraph ten different trendlines, the
whole chart will be a lot overloaded, if I could put the axis in one layer
and each trendline in an own layer I would have the possibility to select
different layers of the Image. I could show axis+trends1,2,3 and so on.
Of course I Need to find a way to select the layers i wont to show in
Firefox as well :-)
Is there a way?
Georg
--
GSI, Experiment Elektronik Phone: +49-6159-71-1338
Planckstr. 1, 64291 Darmstadt FAX: +49-6159-71-2986
GSI Helmholtzzentrum für Schwerionenforschung GmbH
Sitz der Gesellschaft: Darmstadt
Handelsregister: Amtsgericht Darmstadt, HRB 1528
Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, Dr.-Ing.
Jürgen Henschel
Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph
Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt
Linev, Sergey Dr.
2014-10-20 16:12:45 UTC
Permalink
Dear Georg,

Probably you mixed up very old Carrot project with JavaScript ROOT I/O.

Some documentation and examples you will find here

http://web-docs.gsi.de/~linev/js/

Regards,
Sergey

Am 20.10.2014 17:53 schrieb Georg Troska <***@uni-dortmund.de>:
Hi Sergey, Andre, dear Rooters,

I knew about the JavaScript-Stuff before, but what I read from the root
webpage was that the only working version runs the with Root 3.something
only. So it's rather old. :-) Unfortunately I was not able to run the
download-files. Do you have a newer Versions. I would definetely prefer
this solution.

thanks to Andre, this was exactly what I was searching for. Do you know
how to build be layers in root? So how to put the elements of one graph
into one layer?

Georg
Post by Sergey Linev
Dear Georg,
There is another alternative to display ROOT canvas in web browser.
http://web-docs.gsi.de/~linev/js/3.0/files/fileitem.htm?file=zdemo.root&item=zdemo;1
Such page can be inserted into any webpage with <IFRAME
src="..."></IFRAME> tag.
Regards,
Sergey
Post by Georg Troska
Hi,
I'm thinking about using the SaveAs function of TCanvas to show some
Charts as gifs in the web.
Do you think it would be possible to use imageformats that support layers
to activate or deactivate some content.
For example, if I am showing in a TGraph ten different trendlines, the
whole chart will be a lot overloaded, if I could put the axis in one layer
and each trendline in an own layer I would have the possibility to select
different layers of the Image. I could show axis+trends1,2,3 and so on.
Of course I Need to find a way to select the layers i wont to show in
Firefox as well :-)
Is there a way?
Georg
--
GSI, Experiment Elektronik Phone: +49-6159-71-1338
Planckstr. 1, 64291 Darmstadt FAX: +49-6159-71-2986
GSI Helmholtzzentrum für Schwerionenforschung GmbH
Sitz der Gesellschaft: Darmstadt
Handelsregister: Amtsgericht Darmstadt, HRB 1528
Geschäftsführung: Professor Dr. Dr. h.c. mult. Horst Stöcker, Dr.-Ing.
Jürgen Henschel
Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph
Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt
André Rummler
2014-10-21 12:05:50 UTC
Permalink
Post by Georg Troska
thanks to Andre, this was exactly what I was searching for. Do you know
how to build be layers in root? So how to put the elements of one graph
into one layer?
Hi Georg,

I checked the output generated based on one of my test files and it
seems that the TSvg class is too simple and does not make use of layers
at all. It would be nice if its functionality could be expanded (it also
does not support e.g. hatched area). From my point of view this would
probably require changes in the print method as there is a loop over all
primitive objects which get "painted" using the selected driver. Such a
layer feature could be also used by other output drivers, e.g. pdf ,
where the output file format supports layers. For a quick work around,
you could make your own printing routine which prints each intended
layer into individual svg files. Those can be combined afterwards,
either within root or with a couple of lines in python as it is just
simple xml.

André
--
L.A.P.P. ***@lapp.in2p3.fr
Dr. André Rummler phone: +33 4 50 09 16 23
9 Chemin de Bellevue
BP 110 F-74941 Annecy-le-Vieux CEDEX mobile: +49 176 51262211
FRANCE skype: andrerummler1
Continue reading on narkive:
Loading...