linechart

Python Plotly Line Chart with a Dataframe: Wrong scale on the y-axis

Python Plotly Line Chart with a Dataframe: Wrong scale on the y-axis Question: I try to create a line chart with plotly out of a dataframe. Sounds easy, but I’m facing two isseus: The y-axis is scaled wrong. As you can see it is not order from lowest price to highest price. How can I …

Total answers: 1

PPTX Python – How to fix ValueError: chart data contains no categories for a LineChart?

PPTX Python – How to fix ValueError: chart data contains no categories for a LineChart? Question: I’m trying to replace data in an existing line chart in Python PPTX. Here’s the code I’m using: for chart in charts: chart_data = CategoryChartData() chart_index = list(charts).index(chart) scenario_no = chart_index + 1 sc_df = wrk_df[wrk_df[‘Scenario No’] == scenario_no] …

Total answers: 1

Plotly: Is it possible to color specific portion of the line in line chart?

Plotly: Is it possible to color specific portion of the line in line chart? Question: Sample line chart import plotly.express as px df = px.data.stocks() fig = px.line(df, x=’date’, y="GOOG") fig.show() I want to color the values > 1.1 and values<0.95 to a different color(ex: red) Is it possible in plotly to color the specific …

Total answers: 1

Add label values to bar chart and line chart

Add label values to bar chart and line chart Question: I have created a bar chart and a line chart using two different y-axes for the following dataframe. import pandas as pd import matplotlib.pyplot as plt df = pd.DataFrame({‘DXC’:[‘T1’, ‘H1’, ‘HP’, ‘T1_or_H1_or_HP’], ‘Count’: [2485, 5595, 3091, 9933], ‘percent’:[1.06, 2.39, 1.31, 4.23]}) DXC Count percent 0 …

Total answers: 2