holoviz / holoviz/datashader

Datashader almost handles logarithmic axes in MPL

Open
#297 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.6k
Forks
376
Avg merge
4h 32m
Merged PRs (30d)
1

Description

I want to use Datashader to plot tens of thousands of lines on a log-log plot using MPL. I copied @tacaswell's code from PR #200, replacing `cvs.points` with `cvs.lines`, and formatted my data in a DataFrame, as discussed in issue #286.

I was pleased that when I designated my MPL axes to be logarithmic
```
ax2.set_xscale("log", nonposx='clip')
ax2.set_yscale("log", nonposy='clip')
```
Datashader did output the result on the correct scale. Unfortunately, there is an artificial stair step behavior. I am not certain the cause but it seems like the pixels were binned on a linear scale, then transformed to a logarithmic scale.

Here is the result when using log scale
![test_log](https://cloud.githubusercontent.com/assets/9484229/23737233/af9c3b22-045f-11e7-9aa6-87e33e484134.png)

and here is the result when I simply take the log10 of the data before passing it to Datashader
![test](https://cloud.githubusercontent.com/assets/9484229/23737243/bb271480-045f-11e7-8efc-1f27e3f09826.png)

I want to have the plots from the second version, but with the labels from the first version. Any ideas how to do this?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with Datashader line aggregation and Matplotlib's logarithmic x and y axes, comparing it with the log10-transformed data shown in the report. Trace where the plotted data is binned and transformed; done means the logarithmic-axis output matches the transformed-data plot while retaining the original-axis labels.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.