Skip to content
Advertisement

Tag: plotly

How to show data by day in a Plotly chart

I have a dataframe with the number of people vaccinated per day and I’m trying to put this data in a daily bar chart of Plotly, but it aggregates the data every about 13 days. I don’t want the aggregated view this way, I need it to show the bars per day. Below is a part of the dataframe and

Python interactive plotting with click events

I’m currently trying to bring in some data through np, do some processing on that initial data, plot it, but then be interactive with my plot. Plotly has a tutorial of how to take the plot and change the color of the data points (in jupyter using the click event https://plotly.com/python/click-events/). What I’m hoping to do is be able to

Map of a country with plotly

The aim of create a map of a country with plotly. I show you the code to make the map with dots from cities and I want to change it to regions: In the scope we have by default: “world” | “usa” | “europe” | “asia” | “africa” | “north america” | “south america”. How to implement those who are

Multiple color argument in plotly in python

My objective is make a bar plot in plotly. I did I get I want Type A & Type B to have different colors, and preferable additional separate legend. I tried: but this gives error. Answer Using color to illustrate two different dimensions of your data would, in my opinion, quickly become very confusing. Unless you were able to use

How to customize plotly legend order?

I want to change the ordering of legend in my boxplot from 1-12, or perhaps even renaming them to Jan, Feb, etc. Any idea how could I do it? Answer px.box is plotting your data in the order that it’s reading through your DataFrame df, so you can pass a sorted DataFrame to px.box instead: If you want the names

Combine DateRangePicker and Dropdown in Plotly Dash

I’m trying to use DateRangePicker and Dropdown to callback a dash_table. Actually I tried to call dropdown option first and then call dash_table after calling options, but it didn’t work. I don’t know how to add a second call back that is based on dropdown options. Below is my code: Answer You can include both filters in your callback as

Display only single line on hover, hide all other lines

Is there is a way to hide all other lines on a figure, when I am hovering a single one? Example: will produce: and I want this, when I hover particular line (but without manually switching off all other lines and keeping X, Y axes dims): UPD: inside jupyter notebook Answer If you are running into issues, here is the

Advertisement