New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add method for drawing graphs using Ivan Kuckir graph drawer #13418
Comments
comment:2
oups, the "translation" is not used by the method, will fix it soon. |
Attachment: 13418_ivank_graph_drawer-sl.2.patch.gz |
comment:3
Oups, I updated the patch but forgot to click the box. Redone it: now both patches are the same. The patch now works for any graph ! (there might be a limit for the size... I don't know) Needs review! |
This comment has been minimized.
This comment has been minimized.
comment:4
Apply 13418_ivank_graph_drawer-sl.patch |
comment:5
A reviewer can also think of a better name for the method... |
comment:6
Very interesting and useful patch ! This looks good to me. I have some minor comments. For the name, maybe something like "html_interactive_display" or just "html_show" or maybe "show_interactive", so that the tab completion hints at the method ? You give credit to Ivan Kuckir in the documentation. Maybe an informative and short name is more useful. Could we ensure that a browser is called when this function is used from a terminal ? I have a small concern about the time-life of the web site which is called. How long will it exist ? Anyway, I will give a positive review provided the name has been modified. |
comment:7
Hello! I like this graph visualisation very much, but the implementation is, I think, a problematic one. I see no issue with the situation chapoton described (calling the method in a terminal) as user probably do not expect great results from trying to invoke an interactive visualisation inside a terminal. :-) Actually, I do not know if show or plot makes any effort in this direction. It may be a topic for a new Trac ticket. The problem is, IMHO, the IFRAME -- dependency on some internet server is not good at all, because admins could track our users, because Sage should work without an internet connection as much as possible, and because this internet server do not have to work in future. So, what to do now? Well, the webpage with the script seems very non-free, the author explicitly claims copyright. There are similar open source solutions on the web that we can use locally (http://arborjs.org/ , for example). I would gladly help with that. Also, you can try to contact Ivan, and ask him if he wants to open the code. Again, I would gladly help with the integration. Or, you can just ignore me as I am no big authority here. :-) |
comment:8
Well, plot and show usually work very well from a terminal, by calling either a browser or jmol, for example. I agree that the dependency to an external website is not a good thing. |
Apply this one only. |
comment:9
Attachment: 13418_ivank_graph_drawer-sl.patch.gz I agree with you. Returning an iframe that is hidden to the user was not a good idea. Although there exists other open source alternative for doing such graph visualisation, I believe this patch is simple to code and useful for integration in Sage (I used it myself at least two times to visualize graphs since September). The interaction with other software (closed source or not) is not forbidden in Sage as there exists interfaces to Magma, Maple for instance. An interface to arborjs would be nice as well and I am willing to referee such tickets. I uploaded a new patch. Instead, I just return an inoffensive string. The user may do whatever he wants with it. I think it is better like that. Before, the earlier code returning Needs review again! |
This comment has been minimized.
This comment has been minimized.
comment:10
Also, I followed the convention that methods returning string representation of a graph ends with
|
This comment has been minimized.
This comment has been minimized.
comment:11
Helloooooooooo Lukas !!! I discusse with Sebastien about this patch two days ago, and I didn't get your point about Iframes.. What's the problem with the wesite's owner being able to know who is using his applet ? And possibly also knowing that it is being used through Sage ? We may write to him to ask whether he sees anything wrong with that.. I am a bit against adding more methods and also against adding them when their name is so "mysterious", and gives no idea of what the method actually does... Which is the case with Nathann |
comment:12
Hi! I am the last person to block someone else's initiative, so I really do not mind if this pass. I was trying to make the point that user's graphs are part of his work and shouldn't be shared with anyone else when it isn't both necessary and obvious that this happens. This is weakend by the fact that graph itself doesn't tell much about the nature of your work without the most carefull inspection. And, of course, mathematicians who do actual research on Sage, are not really the target group for this functionality. :-) |
comment:13
Yoooooooooooooooooooooooo !!! Oh. Well, then we can add scary warnings everywhere saying that KGB spies may be watching Nathann |
Commit: |
Branch: public/ticket/13418 |
comment:19
no longer needed, as one can do "g.view(method='js') for a similar experience. |
comment:20
does somebody has any objection against closing this ticket ? |
comment:21
ok, no reaction, let us close that. |
comment:22
No objection. |
comment:23
Replying to @fchapoton:
you mean |
This adds the following method :
This string can be used for visualization at this adress :
http://g.ivank.net/
Apply: attachment: 13418_ivank_graph_drawer-sl.patch
Component: graph theory
Branch/Commit: public/ticket/13418 @
77b51ab
Issue created by migration from https://trac.sagemath.org/ticket/13418
The text was updated successfully, but these errors were encountered: