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.

Q: Is it possible to modify the strokeWidth of a Strip Plot?

See original GitHub issue

Here’s another question from my newsroom colleagues. One of them was pleased to make a strip chart this morning, but was frustrated by how small and faint the lines were. I thought that perhaps the strokeWidth option could fatten them up, but it didn’t seem to work.

Is there a way to do it? Here’s a rough example with some dummy data I’ve been playing with.

import pandas as pd
import altair as alt
from datetime import datetime
from vega_datasets import data

source = data.la_riots()
source = source[source.death_date < datetime(1993, 1, 1)]

alt.Chart(source).mark_tick(strokeWidth=50).encode(
    x='death_date:T'
)

visualization 22

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jakevdpcommented, May 30, 2019

In Altair 3, thickness is supported:

import pandas as pd
import altair as alt
from datetime import datetime
from vega_datasets import data

source = data.la_riots()
source = source[source.death_date < datetime(1993, 1, 1)]

alt.Chart(source).mark_tick(thickness=4).encode(
    x='death_date:T'
)

visualization - 2019-05-29T222401 315

1reaction
kanitwcommented, May 18, 2018

Tick is drawn using a rectangle, so strokeWidth won’t work. In the pending VL 2.5, you can use thickness to customize this. (There was a bug that this thickness is missing.)

For now you can customize the thickness via the tick config.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customizing Visualizations — Altair 4.2.0 documentation
Customizing Visualizations . Altair's goal is to automatically choose useful plot settings and configurations so that the user is free to think...
Read more >
Change errorbar thickness in Altair - Stack Overflow
The "thickness" of the CI is the strokeWidth parameter in the encode of the mark_errorbar; The extend parameter could be "ci" , "stdev"...
Read more >
How to Create a Scrolling Strip Chart in SciChart?
Create a new class which inherits NumericLabelProvider. We are going to format our labels to include a relative time. ... We simply apply...
Read more >
Data Types, Graphical Marks, and Visual Encoding Channels
The bar width is set to a default size. To change the width, try setting the `rangeStep` property of the `x` channel's `scale`...
Read more >
Stripplot using Seaborn in Python - GeeksforGeeks
Strip plot · x, y, hue: Inputs for plotting long-form data. · data: Dataset for plotting. · order: It is the order to...
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