Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
plotly-chart-generator
Quickly display basic Plotly charts based on data inside a Pandas dataframe.
Readme
.. image:: https://img.shields.io/pypi/l/plotly_chart_generator :alt: PyPI - License
This package allows the user to quickly generate plotly charts with customized styling and formatting from Pandas dataframes and other data structures with as little as one line of code.
The following chart types can be created:
Chart examples are available at https://github.com/PrebenHesvik/Plotly-Chart-Generator
.. code:: python
pip install plotly_chart_generator
.. code:: python
from plotly_chart_generator.display_chart import display_chart
from plotly_chart_generator.bar_chart import bar_chart
from plotly_chart_generator.chart_styles import chart_styles
# create data
index = ['Product A', 'Product B', 'Product C']
values = {'Products': [37.5, 40.2, 27.8]}
data = pd.DataFrame(data=values, index=index).transpose()
# layout
layout = chart_styles(
width=500,
height=600,
title='Product sales (millions)',
title_size=16,
xaxis_ticksize=14)
# set colors
idmax = data.idxmax(axis=1)[0]
max_val_idx = data.columns.get_loc(idmax)
colors = ['lightslategray',] * len(data.values[0])
colors[max_val_idx] = 'crimson'
# traces
traces = bar_chart(
df=data,
bar_width=0.4,
textpos='inside',
linewidth=1,
marker_color=colors)
display_chart(traces=traces, layout=layout)
Most of the descriptions of arguments have been copied form the Plotly Figure Reference Guide at https://plotly.com/python/reference/
FAQs
Quickly display basic Plotly charts based on data inside a Pandas dataframe.
We found that plotly-chart-generator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.