Discrepancy between image from hv and using Datashader directly
See original GitHub issueOn the left is the saved image from datashader, on the right is the layout / plot from holoviews, datashader, and bokeh. The only difference that I’ve been able to discern between my two methods is that I’m using the line method to plot with datashader and the curve method with holoviews: left:
for column in range(1,4):
agg = cvs.line(df, '0', str(column), ds.count())
img = tf.shade(agg, how='eq_hist')
imgs.append(img)
stacked = tf.stack(*imgs)
export_image(stacked, data)
right:
curvesx = hv.Curve(df.iloc[:, [0,1]])
curvesy = hv.Curve(df.iloc[:, [0,2]])
curvesz = hv.Curve(df.iloc[:, [0,3]])
layout = curvesx * curvesy * curvesz
renderer = hv.renderer('bokeh').instance(fig='html')
plot = renderer.get_plot(datashade(layout, dynamic = False)).state
plot.plot_width = 800
plot.plot_height = 500
show(plot)
Not only does the data look a little different, (note the bottom of the graph, on the left there is data that is an outlier which doesn’t exist on the right). I’ve tried different aspect ratios, sizes etc.
In addition, I believe that I’m not generating a large enough image from holoviews, the right side graph seems much lower quality then the saved image, almost as if it is created small and then stretched out.
Any insight?
Thank you.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Discrepancy between image from hv and using Datashader ...
I believe the HoloViews interface is concatenating all curves (separated by NaNs) and aggregating that entire collection of curves, correctly ...
Read more >Plotting Pitfalls — Datashader v0.14.3
Common plotting pitfalls that get worse with large data# · Overplotting · Oversaturation · Undersampling · Undersaturation · Underutilized range · Nonuniform ...
Read more >pyviz/pyviz - Gitter
There seems to be a mismatch between the resolution that datashader is targeting and the resolution of the image. bokeh_plot (14).png.
Read more >Using holoviews renderer with datashader in a script
import holoviews as hv import numpy as np from holoviews.operation.datashader import datashade, dynspread hv.extension('bokeh') #### Disable ...
Read more >Working with large data using datashader — HoloViews v1.15.3
import datashader as ds import numpy as np import holoviews as hv import ... Because all of the data in these plots gets...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe you want something like this?
You should then be able to datashade df2 directly.
I’ll look into it thank you