{"action":"created","issue":{"url":"https://api.github.com/repos/ioam/holoviews/issues/115","repository_url":"https://api.github.com/repos/ioam/holoviews","labels_url":"https://api.github.com/repos/ioam/holoviews/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/ioam/holoviews/issues/115/comments","events_url":"https://api.github.com/repos/ioam/holoviews/issues/115/events","html_url":"https://github.com/ioam/holoviews/issues/115","id":81448374,"number":115,"title":"An easy way to switch the plot class of an element","user":{"login":"jlstevens","id":890576,"avatar_url":"https://avatars.githubusercontent.com/u/890576?v=3","gravatar_id":"","url":"https://api.github.com/users/jlstevens","html_url":"https://github.com/jlstevens","followers_url":"https://api.github.com/users/jlstevens/followers","following_url":"https://api.github.com/users/jlstevens/following{/other_user}","gists_url":"https://api.github.com/users/jlstevens/gists{/gist_id}","starred_url":"https://api.github.com/users/jlstevens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlstevens/subscriptions","organizations_url":"https://api.github.com/users/jlstevens/orgs","repos_url":"https://api.github.com/users/jlstevens/repos","events_url":"https://api.github.com/users/jlstevens/events{/privacy}","received_events_url":"https://api.github.com/users/jlstevens/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ioam/holoviews/labels/feature","name":"feature","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-27T13:33:36Z","updated_at":"2016-02-04T02:17:19Z","closed_at":null,"body":"Right now the ``Store`` holds the association between the elements and their corresponding plotting classes. This has worked well so far but you can imagine having several radically different plotting styles for the same ``Element``. Admittedly I can't think of any good examples right now but it is certainly feasible!\r\n\r\nIn general, we only want to define new elements when there is a compelling semantic meaning to assign to the data  and *not* just because you want to plot the same data slightly differently (that said, you could argue that ``Scatter`` and ``Curve`` is such a distinction - but that is a very common case).\r\n\r\nYou can already change the association by directly working with Store but you can actually imagine making the plotting class into a plot option. This would work as the display hooks have access to the ``Store`` and all the options even before the element is dispatched to a particular plotting class. In particular I can imagine something like this:\r\n\r\n```python\r\n%%opts Image [plot_class='FancyImagePlot']\r\n```\r\n\r\nThis would then dispatch any ``Image`` elements in that cell to the ``FancyImagePlot`` class instead of the normal ``RasterPlot``. Obviously, there would have to be a way for the plot classes to ignore the the ``plot_class`` option (maybe just a parameter on Plot with negative precedence?).\r\n\r\n I can also imagine this would be useful for external developers writing their own custom plotting classes."},"comment":{"url":"https://api.github.com/repos/ioam/holoviews/issues/comments/179578579","html_url":"https://github.com/ioam/holoviews/issues/115#issuecomment-179578579","issue_url":"https://api.github.com/repos/ioam/holoviews/issues/115","id":179578579,"user":{"login":"philippjfr","id":1550771,"avatar_url":"https://avatars.githubusercontent.com/u/1550771?v=3","gravatar_id":"","url":"https://api.github.com/users/philippjfr","html_url":"https://github.com/philippjfr","followers_url":"https://api.github.com/users/philippjfr/followers","following_url":"https://api.github.com/users/philippjfr/following{/other_user}","gists_url":"https://api.github.com/users/philippjfr/gists{/gist_id}","starred_url":"https://api.github.com/users/philippjfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philippjfr/subscriptions","organizations_url":"https://api.github.com/users/philippjfr/orgs","repos_url":"https://api.github.com/users/philippjfr/repos","events_url":"https://api.github.com/users/philippjfr/events{/privacy}","received_events_url":"https://api.github.com/users/philippjfr/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T02:17:19Z","updated_at":"2016-02-04T02:17:19Z","body":"I don't think this is an idea we want to support anymore do we? Switching out the plotting class using ``Store.register`` is easy enough but if you think switching out the plot for a single cell is important we could still consider what you suggested."}}