question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make plot options available to operations?

See original GitHub issue

Right now, operations like datashade and rasterize have access to whatever is stored directly in an Element or Container, but cannot use the plot options that were specified on that object. In general, this approach makes perfect sense, because the plot options can be specific to the given backend, and something like datashade will work entirely differently from whatever backend happens to be in use. Plus it’s difficult to figure out the options that will later apply on display, for an operation that is called before display.

While acknowledging those issues, it’s clear that this design is causing issues for multiple users (https://github.com/ioam/holoviews/issues/2195, https://github.com/ioam/holoviews/issues/2398, and https://github.com/ioam/holoviews/issues/2609). The underlying issue is that many of the plot options we provide are not simply about trivial tweaks to one plotting library, but are about declaring fundamental facts about what type of visualization this is. For instance, if you set logx=True, logz=True, and color_index='value' on a plot, you get a very specific sort of plot that has meaning across backends. But if you then take such an Element and use datashade() or rasterize() on it, the information about logarithmic mapping and color mapping is lost. Such information can then be supplied manually to the datashade() call, but the benefits of having declared it are lost – the information has to be re-applied every single time the operation is called.

In these cases, I believe that there is a subset of plot options that are declarations about “which data you want to see” (e.g. color_index) and “what properties does the data have” (log...), not simply plotting-library directives (though they are also that). In these cases, I think we should figure out some way to declare that information in a way that it becomes available in the Element so that it can be respected by an operation. Can anyone think of a way we can make this feasible?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kcpeveycommented, Jan 15, 2019

I don’t have any great suggestions, but this has confused me for a long time. It DOES make sense from code perspective that rasterize/datashade would have no knowledge of the original data or plot options, BUT from a user perspective, its highly confusing - I’m left wondering where my options went or why they aren’t working on this drawing, but they’re working on another (when the difference is simply datashade vs non-datashade). I’d love some method of handling this that was more apparent to users.

0reactions
jbednarcommented, Sep 1, 2019

datashade() and rasterize() take options entirely independent of any hv options; they pass arguments down to the underlying Datashader functions, which are implemented by the separate Datashader library that was designed independently of HoloViews or any of the HoloViews backends. So for the moment, you just have to look at the output of hv.help(datashade), etc., to see what’s available and how that maps to what you want to do. To make plot options available to operations we will have to map hv’s options onto Datashader’s options automatically where possible, which will take some time and effort. It’s still worth it, because the only other alternative is that users have to do such mapping every time they use one of these operations, which is also a good bit of effort. So anyone who wants to work out that mapping would be a real help here!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to plot, batch plot, or publish to the drawing folder in ...
Go to Options > Plot and Publish > Automatic Publish Settings. Configure the Auto Publish Settings as desired. Use the AUTOPUBLISH command for ......
Read more >
Plot expression or function - MATLAB fplot - MathWorks
This MATLAB function plots the curve defined by the function y = f(x) over the default interval [-5 5] for x.
Read more >
Plots of Functions - PGF/TikZ Manual
TikZ can be used to create plots of functions, a job that is normally ... The ⟨local options⟩ of the plot operation are...
Read more >
Graphical Plot Options - Hydrologic Engineering Center
Several plotting features are available from the Options menu on all of the graphical plots. These options include: zoom in; zoom out; selecting...
Read more >
Understanding plot() Function in R - Basics of Graph Plotting
The main title is added using the main option in the plot function. · The titles for the axes are provided using xlab...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found