Saravanan666/pypi-org huggingface dataset:
Package: plot-highlight
Plot Highlightplot_highlight is a Python visualization library based onseaborn.This liblary is inspired bygghighlightpackage in R.InstallationUse pippip install plot-highlightUsageDraw seaborn charts, highlighting the specific items.The following seaborn functions are supported.sns.scatterplotsns.lineplotsns.histplot📊 Scatter plot with highlightimportseabornassnsdf=sns.load_dataset('tips')importplot_highlightasphlphl.scatterplot(data=df,x='total_bill',y='tip',hue='day',highlights=['Sat','Sun'])📊 Line plot with highlightimportseabornassnsdf=sns.load_dataset('healthexp')importplot_highlightasphlphl.lineplot(data=df,x='Year',y='Life_Expectancy',hue='Country',highlights=['Japan','USA'])📊 Histgram with highlightimportseabornassnsdf=sns.load_dataset('penguins')importplot_highlightasphlphl.histplot(data=df,x='flipper_length_mm',hue='species',highlights='Adelie')LicenseThis software is released under the MIT License, see LICENSE.
Package: plothist
Visualize and compare data in a scalable way and a beautiful style.Installation and documentation:https://plothist.readthedocs.io/Image gallery:https://plothist.readthedocs.io/en/latest/example_gallery/Advantages of the package: scalability, style and user-friendly way of managing variables and a stunningimage gallery.First idea: default style is already presentation-ready and/or publication-ready (with no effort).Second idea: separate the histogram creation from its plotting. This allows to easily manage histogram objects (defined in theboost_histogrampackage) and plot large amount of variables and data really fast.Third idea: visualize a lot of variables easily with a variable manager. Really easy to modify the plotting information and make multiple plots of the same variable with different settings.Fourth idea: detailed and user-friendly documentation including a marvelousgallery of examples.
Package: plotilleresample
plotilleresamplePython3 module to resample datasets before plotting with Plotille.RationaleI want to optimize plot and scatter function of plotille.InstallationInstall with pippip3 install -U servusresampleUsage#!/usr/bin/env python3

import plotille

import plotilledimreduction

import math

from shutil import get_terminal_size

from vtclear import clear_screen

import numpy as np


w = get_terminal_size().columns - 20
h = get_terminal_size().lines - 7

r = 10000
res = np.random.normal(size=r)

# Here I'm testing stuffs with histograms.
# input("Histogram:")
# print(plotille.histogram(res, bins=w*2, width=w, height=h))

X = [i for i in range(r)]
Y = [math.sin(i / 100) * 100 for i in range(r)]

print(" · Scatter...")
xs, ys = plotilledimreduction.dim_reduction_scatter(X, Y, w, h)
print(" · Plot...")
xp, yp = plotilledimreduction.dim_reduction_plot(X, Y, w, h)
print(" --- READY ---")

print(f"Len plot.x {len(xp)}")

print(f"Len scatter.x {len(xs)}")

input("Plot:")
clear_screen()
print(plotille.plot(xp, yp, w, h))

input("Scatter:")
clear_screen()
print(plotille.plot(xs, ys, w, h))
Package: plotink
plotinkPython helper routines for driving AxiDraw, EggBot, WaterColorBot, and similar plotter-based machines.Source code and issue tracker are hostedat github.InstallationReleases are availableon PyPI.To install the latest release, usepip install plotinkOverviewThese library files are intended to provide a single place to edit routines that are common to theEggBot extensions for Inkscape, theWaterColorBot extensions for Inkscape, theAxiDraw extensions for Inkscape, and derivative machines. Hosting these in a single place means less duplication of code, and (more importantly) reduces the number of cases where identical code changes need to be made in multiple places.The library files are:ebb_serial.py   - General routines for communicating with the EiBotBoard by USB serial.ebb_motion.py   - Motion-related routines for interacting with the robot.plot_utils.py   - Additional helper functions for managing plots and their data.text_utils.py   - Additional helper functions for managing text.rtree.py        - Minimal R-tree spatial index class for calculating intersecting regions.spatial_grid.py - Specialized flat grid spatial index class for finding nearest neighbors.Python version supportLatest version requires Python 3.6 or newer.A previous release,Plotink version 1.0.1, supports python 2.7 as well.LoggingThis library uses the standard python logging module. Suggested configurations follow.For stand-alone machine control, print info, warnings, and errors to stdout:import logging

logging.basicConfig(level=logging.INFO, format='%(message)s')For running as an Inkscape extension, print errors to Inkscape's extension errors log:import logging

logging.basicConfig(level=logging.ERR,
        format='%(message)s'),
        filename = "~/.config/inkscape/extension-errors.log")
Package: plotinpy
PlotInPyThis is a collection of plotting functions that I am creating
to contain everything I find useful on the topic of plotting in Python.
These are not code snippets though.
Each function is intended to be as robust as possible,
to support (for example) being used inside subplots, using gridspecs,
and so on. Maybe they are not perfect... yet! The intention is
to improve them until they are.ExamplesBroken barsplt.figure()
pnp.plot_bars_with_breaks([1,2,30],[(15,25)])
plt.savefig("img/example1.png")Example 1Styled broken barsplt.figure()
pnp.plot_bars_with_breaks([1,2,30, 1000],[(15,25), (50, 975)], style="~~", break_args={"hatch": '///'})
plt.savefig("img/example2.png")Example 2
Package: plotit
to install the python package plotit:Python 3.5 or higher must be installed. You can download last version inhttps://www.python.org/2. Uncompress the zip file in an empty folder, open a command session in this folder and execute
the commandpy -3 setup.py installtypical application can be found in bin folder bin. Example:py -3 print_basic_plot 100, ‘03/05/2054’, 0, 5
Package: plot_joblog
Plotting time tables for jobs ran by GNU Parallel=================================================The program ``print_joblog`` produces a textual representation of thetime required by a sequence of jobs ran by GNU parallel(http://www.gnu.org/software/parallel/).To use it, call GNU Parallel with the ``--joblog`` option::$ parallel --joblog log.txt ...[all the other parameters]...After the file ``log.txt`` has been created, run ``plot_joblog`` on it::$ plot_joblog log.txt(You do not have to wait till ``parallel`` has exited to run``plot_joblog``.)Installing the program----------------------Move in the source directory and run the following command::$ python3 setup.py installExample-------Here is an example of the output::$ plot_joblog -w 20 joblog_example.txt1: |####                |2: |####################|3: |########            |4: |###                 |5: |   ################ |6: |    ###########     |$Output can be customized by means of the following parameters:- ``--width`` specifies the overall width of each bar, in characters.- ``--space`` allows to set up the character used to fill thebackground of the bar.- ``--fill`` allows to specify the character to be used to fill thebars.A nice choice for UTF-8 terminals is to use the character \u2588 (``█``)for filling the bars::$ plot_joblog -w 20 --fill='█' joblog_example.txt1: |████                |2: |████████████████████|3: |████████            |4: |███                 |5: |   ████████████████ |6: |    ███████████     |$Run ``plot_joblog --help`` to see all the options provided by theprogram.License-------This program is released under the MIT license.
Package: plot-likert
Plot LikertThis is a library to visualize results fromLikert-typesurvey questions in Python, usingmatplotlib.InstallationInstall the latest stable version from PyPI:pipinstallplot-likertTo get the latest development version:pipinstall--preplot-likert# ORpipinstallgit+https://github.com/nmalkin/plot-likert.gitQuick start# Make sure you have some dataimportpandasaspddata=pd.DataFrame({'Q1':{0:'Strongly disagree',1:'Agree',...},'Q2':{0:'Disagree',1:'Strongly agree',...}})# Now plot it!importplot_likertplot_likert.plot_likert(data,plot_likert.scales.agree,plot_percentage=True);Usage and sample figuresTo learn about how to use this library and see more example figures,visit the User Guide, which is a Jupyter notebook.Want to see even more examples?Look here!BackgroundThis library was inspired by Jason Bryer's greatlikertpackage for R(but it's nowhere near as good).
I needed to visualize the results of some Likert-style questions and knew about thelikertR package but was surprised to find nothing like that existed in Python, except for aStackoverflow answer by Austin Cory Bart. This package builds on that solution and packages it as a library.I've since discovered that there may be other solutions out there.
Here are a few to consider:https://github.com/dmardanbeigi/Likert_Scale_Plot_in_Pythonhttps://github.com/Oliph/likertScalePlothttps://blog.orikami.nl/behind-the-screens-likert-scale-visualization-368557ad72d1While this library started as a quick-and-dirty hack,
it has been steadily improving thanks to the contributions of a number of community members andFjohürs Lykkewe.
Thank you to everyone who has contributed!
Package: plotlog
Output graph script by log file. In addition to a single file, you can
easily process a large number of identical format log files.System requirementslanguage : After Python 3.4.7necessary packagematplotlibpandasPyYAMLinstallpipinstallplotlogIf you need build your environmentgitclonehttps://github.com/s-naoya/plotlogcdplotlogpythonsetup.pyinstallUsageplotlog [-h] [--setting SETTING_FILE_PATH] [--copy]
        [--new | --all | --after DATE | --select DATE [DATE ...] |
        --input LOG_FILE_PATH [LOG_FILE_PATH ...]] [--slice BEGIN END]
        [--noshift]

optional arguments:
  -h, --help            show this help message and exit
  --setting SETTING_FILE_PATH
                        select setting file (default:'user.yml')
  --copy                copy original setting file
  --new                 DEFAULT: output graphs that has not been output yet
  --all                 output graphs for all data
  --after DATE          output graphs after the selected DATE(yyyymmddhhmm)
  --select DATE [DATE ...]
                        output graphs only selected DATEs
  --input LOG_FILE_PATH [LOG_FILE_PATH ...]
                        output graphs for selected log file
  --slice BEGIN END     sliced data by begin and end x-axis value
  --noshift             don't shift plot start time and x-axisFirst, create setting file.plotlog --copyEdit the created user.yml, setting each pass and the graph etc to
create. Setting items that do not need to be changed may be deleted.Finish edit user.yml, create graph.plotlogIf user.yml is set correctly, a graph is drawn for a log file that has
not yet been output graph.SettingIt is reflected by editing user.yml. Also, this is reflected by creating
a new yaml file and reading it with the--settingargument.Log file conditionBe sure to use the year, month, date, and time as the name of the log file and cam use some symbol.
However, all log file names under put_log_dir must be in the same format.
The format is specified by log_date_format in the configuration file.Extension and separate character can change setting file.All column equal all rowPut on the directory specified in the setting file (except when using
–-input)LICENCEThis script is licenced under the MIT License. (Seelink)
Package: plotly-calplot
Calendar Heatmap with PlotlyMaking it easier to visualize and costumize time relevant or time series data with plotly interaction.New to the library? Readthis Medium article.This plot is a very similar to the contribuitions available on Github and Gitlab profile pages and toCalplot- which is a pyplot implementation of the calendar heatmap, thus it is not interactive right off the bat.The first mention I could find of this plot being made with plotly was inthis forum postand it got my attention as something that should be easily available to anyone.Installationpipinstallplotly-calplotExamplesInthis Medium articleI covered lot's of usage methods for this library.fromplotly_calplotimportcalplotfig=calplot(df,x="date",y="value")fig.show()# you can also adjust layout and your usual plotly stuff
Package: plotly-chart-generator
DescriptionThis 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:Bar charts (from dataframe)Line charts (from dataframe)Scatter charts (from dictionary)Pie charts (from lists, numpy arrays, Pandas series)Histograms (from lists, numpy arrays, Pandas series)Dot charts (from dataframe)Box charts (from lists, numpy arrays, Pandas series)Sunburst charts (from lists, numpy arrays, Pandas series)Scatter charts subplots (from dictionary)Pie chats subplots (from dictionary)Chart examples are available athttps://github.com/PrebenHesvik/Plotly-Chart-GeneratorInstallationpipinstallplotly_chart_generatorUsagefromplotly_chart_generator.display_chartimportdisplay_chartfromplotly_chart_generator.bar_chartimportbar_chartfromplotly_chart_generator.chart_stylesimportchart_styles# create dataindex=['Product A','Product B','Product C']values={'Products':[37.5,40.2,27.8]}data=pd.DataFrame(data=values,index=index).transpose()# layoutlayout=chart_styles(width=500,height=600,title='Product sales (millions)',title_size=16,xaxis_ticksize=14)# set colorsidmax=data.idxmax(axis=1)[0]max_val_idx=data.columns.get_loc(idmax)colors=['lightslategray',]*len(data.values[0])colors[max_val_idx]='crimson'# tracestraces=bar_chart(df=data,bar_width=0.4,textpos='inside',linewidth=1,marker_color=colors)display_chart(traces=traces,layout=layout)DisclaimerMost of the descriptions of arguments have been copied form the Plotly Figure
Reference Guide athttps://plotly.com/python/reference/
Package: plotly-click-show
plotly_click_showplotly_click_showis a Streamlit component that enables you to capture clicking events on a Plotly plot within a Streamlit app. It provides the coordinates and curve names of the clicked points, allowing for interactive data exploration.Installationpipinstallplotly_click_show==0.1.0(Version)## Usasgesimportstreamlitasst
fromplotly.graph_objectsimportFigure
fromplotly_click_showimportplotly_events# Create a Plotly figurefig=Figure()# Add your traces and layout configuration here# Call the plotly_events function to enable clicking eventsclicked_points=plotly_events(fig)# Access the clicked points, which is a list of dictionaries containing x, y, and namest.write("Clicked Points:",clicked_points)
Package: plotlydash-tornado-cmd
plotlydash-tornado-cmdCommand line wrapper to run a named Plotly Dash script inside a Tornado server.This project is used inContainDS Dashboards, which is a user-friendly
way to launch Jupyter notebooks as shareable dashboards inside JupyterHub. Also works with Streamlit and other
visualization frameworks.Install and RunInstall using pip.pip install plotlydash-tornado-cmdThe file to start is specified on the command line, for example:plotlydash-tornado-cmd ~/Dev/mydashscript.pyBy default the server will listen on port 8888, importing the Dash app named 'app', or locating the first dash.Dash
object that it can find otherwise.To specify a different port, use the --port flag.To explicitly specify the name of your dash.Dash app, use the --server-name flag.plotlydash-tornado-cmd --server-name=app --port=8888 ~/Dev/mydashscript.pyTo run directly in python:python -m plotlydash_tornado_cmd.main <rest of command line>Changelogv0.0.6 Change CWD to script's folder, and also add that folder to the Python search path.
Package: plotly-ecdf
Plotly ECDFEnables plotting ECDF curves using Plotly with a similar API to Plotly ExpressFree software: MIT licenseDocumentation:https://plotly-ecdf.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-09-07)First release on PyPI.
Package: plotly-ex
plotly_exClass/Methodclassmake_subplots_wrapper:def__init__(self,col_max:int=5)->None:defadd_fig_sub(self,fig_sub,fig_sub_title:str=None,row:int=None,col:int=None,rowspan:int=1,colspan:int=1,secondary_y:bool=None,legendgroup:str=None)->None:defbuild_fig(self,row_height=250,shared_xaxes=False,shared_yaxes=False,font_size_default=14,coloraxis_colorscale=None,template='plotly_dark',**kwargs)->go.Figure:
Package: plotly-express
Plotly ExpressPlotly Express is now part of Plotly.py version 4 and so theplotly_expressmodule now just re-exports the contents ofplotly.expressInstallationIf you follow theplotlyGetting Startedinstructions for installation, you will get access toplotly.express.However, if you have existing code that imports fromplotly_expressexplicitly and you don't wish to change it, you can still install the latest version, which just exposesplotly.expressunder theplotly_expressnamespace.ViapipJust runningpip install plotly_express==0.4.0in your terminal should do it!ViacondaYou'll have to install from theplotlychannel withconda install -c plotly plotly_express==0.4.0Getting HelpPlease join ourCommunity Forumor file aGithub Issueif you've found a bug.
Package: plotly-extend-wrapper
plotly_extend_wrapperExtended Python library for PlotlyYou can make plot simplyRequirementPython >= 3.9Plotly >= 5.0.0kaleido = 0.2.1pandas >= 2.2.0GraphPie (wrapper.Plot_pie)Sunburst (wrapper.Plot_sunburst)Bubble (wrapper.Plot_bubble_chart)Line with secondary y-axis (wrapper.Plot_line)Bubble with linear line (wrapper.Plot_bubble_with_line)Common functionupdaterAdd optionsAvailable optionsx-axis titley-axis titlesecondary_y-axis titleshow legendheightwidthmarker sizecommoncheck_directoryCheck directory with pathlibMake directory if parent directory doesn't existIssueIf there are some bugs, please make issue to tell me!
Package: plotlyextreme
PlotlyExtremeSet of wrapper functions to abstract repetitive tasks related to plotting with
the plotly library.The plotly functions are passed as arguments to limit what this package has to
handle.Current PlotsPlot a Big Numberplots.create_big_numberPlot Four Dimensions using Buttonsplots.plot_four_dimensionsExampleimport pandas as pd
from plotly.offline import iplot
import plotly.graph_objs as go
import plotly

from plotlyextreme import plots

df = pd.DataFrame({
                    'abc':[1000,5000,3000,1000,1000,1500,8000,1000],
                    'def':[4,5,6,4,6,4,6,4],
                    'ghi':['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b'],
                    'jkl':['z', 'z', 'z', 'z', 'y', 'y', 'y', 'y'],
                    'annotation_one': ['a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'],
                    'annotation_two': ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
                  })

plots.create_big_number(title='abc', large_number=123, pacing=.7,
                        render_func=iplot)

plots.plot_four_dimensions(df, x='abc', y='def', title='alphabet',
                           segmentation_col='ghi',    button_col='jkl',
                           buttons=['z', 'y'], default_visibility='z',
                           trace_func=go.Scatter, render_func=iplot),
                           x_layout=go.layout.XAxis(tickformat=',d'))
Package: plotly-football-pitch
plotly-football-pitchThis repo contains code to plot football pitches usingplotly. Currently only horizontal pitches are supported, with the origin located at the bottom left
corner of the pitch.ExamplesFurther examples can be found inexamples/pitch.ipynb.fromplotly_football_pitchimportmake_pitch_figure,PitchDimensionsdimensions=PitchDimensions()fig=make_pitch_figure(dimensions)fig.show()fromplotly_football_pitchimport(make_pitch_figure,PitchDimensions,SingleColourBackground)dimensions=PitchDimensions()fig=make_pitch_figure(dimensions,pitch_background=SingleColourBackground("#81B622"),)fig.show()importnumpyasnpfromplotly_football_pitchimportmake_pitch_figure,PitchDimensionsdimensions=PitchDimensions()fig=make_pitch_figure(dimensions)# define number of grid squares for heatmap datawidth_grid=12length_grid=15data=np.array([[random.random()for_inrange(length_grid)]for_inrange(width_grid)])fig=add_heatmap(fig,data)fig.show()Installationpip install plotly_football_pitchDevelopment installationmakesetup-envsource.venv/bin/activate
makedev-install
Package: plotly-gif
Plotly-gifA simple python package to generate .gif from your plotly figures. It works for both 2D and 3D figures. It can even
create_gif motion for you in 3D plots.Installationpip install plotly-gifDependenciesIf you are already using plotly, then you should be good. But, just in case, these are the dependencies:plotly(5.9.0)Plots moleculeskaleido(0.1.0post1)Converts plotly graphs to images (png, svg, etc.)I am not using the most recent version of kaleido as it does not play nice with my computer. Try the newest
version, but if you are having issues install this specific version.Pillow(9.2.0)Used to convert png to gif.numpy(1.23.1)Used for mathUsageThere are three common methods:Built-in Functions/ MacrosCurrently, we have the follow:two_d_time_seriesthree_d_scatter_rotatemore to come... or submit your ownimportplotly.graph_objsasgofromplotly_gifimportGIF,two_d_time_seriesfig=go.Figure()# add your traces()# add your formatting()gif=GIF()two_d_time_series(gif,fig)DecoratorIf you have a function that is changing the `go.Figure' with each loop, you can add the decorator to the func.importplotly.graph_objsasgofromplotly_gifimportGIF,capturegif=GIF()@capture(gif)defplot_(x_,y_):fig=go.Figure()# add your traces()# add your formatting()returnfiggif.create_gif()# generate gifIn-LineThis very similar to the decorator option, but you can call the image capture function directly.importplotly.graph_objsasgofromplotly_gifimportGIF,capturegif=GIF()defplot_(x_,y_):fig=go.Figure()# add your traces()# add your formatting()gif.create_image(fig)# create_gif image for gifreturnfiggif.create_gif()# generate gifExamplesSee examples folderTime to generate gif (60 images per gif)Simple 2D plots with small data sets (100 pts): ~10 secSimple 3D plots with small data sets (100 pts): ~1.5 minWarningIf your code 'hangs' or 'gets stuck and doesn't complete' try changing kaleido versionspip install kaleido==0.1.0post1
Package: plotlyhtmlexporter
Plotlyfriendly, Jupyter Notebook HTML Exporter.NBConvertis a module to convertJupyter Notebooksto other formats (pdf, html etc.).
It suppliesHTMLExporterwhich is used to convert Jupyter Notebooks to html.PlotlyHTMLExporteris a custom Exporter derived fromHTMLExporter. It sanitizes the JS/HTML
present in output cells, but keeps the trusted plotly.js output intact, thus allowing the plotly
charts to be rendered in the resulting html.Installation:Usingpip:$ pip install plotlyhtmlexporterFrom Source:$ git clone https://github.com/plotly/plotlyhtmlexporter
$ cd plotlyhtmlexporter
$ python setup.py installUsage:From Command Line (with NBConvert):$ jupyter nbconvert --to plotlyhtml mynotebook.ipynbFrom the Python interpreter:>>> import nbformat
>>> nb = nbformat.read('mynotebook.ipynb', 4)
>>> from plotlyhtmlexporter import PlotlyHTMLExporter
>>> exp = PlotlyHTMLExporter()
>>> body, resources = exp.from_notebook_node(nb)License: MIT
Package: plotlyink
Plotlyink aims at marryingplotlywithpandasfor quick and easy plotting.Installationpip3installplotlyinkOverviewimportpandasaspdimportplotlyinkdf=pd.DataFrame({'one':[1.,2.,3.,4.],'two':[4.,3.,2.,1.],})# open .html in your browser:df.iplot.scatter()# get figure:fig=df.iplot.scatter(as_figure=True)For more, see:Tutorial Notebook.