Saravanan666/pypi-org huggingface dataset:
Package: plot2html
plot2htmlHelping people publish beautiful automated reports that contribute to transparency, high quality monitoring and faster decision makingWith this library, you can create static .html files with text and charts taking advantage of Google Charts API.Installing this package (on the command line):pip install plot2htmlPython code:# example dataimportpandasaspdtemperature=pd.read_csv('https://raw.githubusercontent.com/rafatro/plot2html/main/tests/Temperature_London_Rome.csv',parse_dates=[0])# date        location  tavg# 2019-01-01  London    7.3# 2019-01-02  London    3.7# 2019-01-03  London    2.2fromplot2htmlimportCreateReportreport=CreateReport("Example of plot2html Report")report.text("<h2>Smart title you can create</h2>This is an example what what you can do with plot2html.")options={'title':'Average temperature at London and Rome','hAxis':{'title':'Date'},'vAxis':{'title':'Average Daily Temperature (Celsius)'},'colors':['#a52714','#097138']}# We want a chart that shows each location as a different serie (each loacation should be a different line on the chart).# Since the location is one column on the dataframe, we need to pivot the dataframe so each location becomes a column.report.plot(data=temperature.pivot(index='date',columns='location',values='tavg').reset_index(),x='date',y=['Rome','London'],type='line',width='2-thirds',height=400,options=options)report.text('''This text is an explanation about the chart to the left.<br>It shows data from <a href='https://meteostat.net/'>Meteostat</a>, that provides open source data about meteorology.<br>You can see Rome temperatures follow the same trend as London's, because both cities are in the northern hemisphere, but Rome is a bit hotter, especialy on the summer.''',width="third")report.exporthtml("C:/Users/rafae/Desktop/plot2html/tests/index.html")You will get this output:Main argumentsData: pandas DataFrame with the columns that are going to be used as either as the horizontal axis or the series of the chart.x: name of the column that will be used as horizontal axis of the charty: name (or several names) of the columns that will be used as series of the chart.type: either 'line' or 'column'. Other alternatives on development.width: how much horizontal space of the screen is going to be occupied by the chart (or text). Possibilities: 'full' (default), 'half', 'third', '2-thirds' or 'quarter'.height: height of the chart in pixels.options: several parameters to be passed to Google Chart API, including title, axis title, colors, font size, annotations, gridlines, legend position etc. See all possibilities onGoogle Charts documentation site. But please note the notation is a bit different because requires the names of the parameters to be inside single quotes'. So, instead ofoptions={hAxis:{title: 'Time',textStyle:{color: '#01579b',fontSize:20}}}useoptions={'hAxis':{'title': 'Time','textStyle':{'color': '#01579b','fontSize':20}}}Enjoy!Any feedback is welcome. This is just the beginning.
Package: plot2svg
plot2svgI was using some other tools to plot and save to.SVGfile, And I found the files are too big.So I make this package myself to generate SVG graphs with small file size.For example, this package plot a bar which is0.6 KB, compared to other tools plot the same bar which is40 KBinstallpip install plot2svgusageplot a barfromplot2svgimportBardata=list(range(25))view=Bar(width=500,height=300,color="red",data=data)svg_context=view.get_svg_context()print(svg_context)view.save_svg('data_bar.svg')plot textsfromplot2svgimportTexttext='''test测试换行plot2svg is light'''view=Text(width=500,height=300,color="red",data=text)svg_context=view.get_svg_context()print(svg_context)view.save_svg('data_text.svg')
Package: plot2vid
plot2vidThe easiest way to create animations using plots.This small Python package lets you store seperate matplotlib plots to create a video.Installationpip install plot2vidBasic Usagefromplot2vidimportPlotRecorderimportmatplotlib.pyplotasplt# Setuprecorder=PlotRecorder("out.mp4")fig=plt.figure()foriinrange(90):# Setting the plot limitsplt.xlim(0,100)plt.ylim(0,100)# Plottingplt.scatter([i],[i])# Recording the framerecorder.add(fig)# Clearing the plotplt.clf()# Storing the resultrecorder.close()The above code creates this video.Advanced UsageYou can change the different settings of the recorder.recorder=plot2vid.PlotRecorder("out.mp4",fps=20)RoadmapSupport MP4Support AVIVariable FPS
Package: plot4d
Plot4D PackageThis is a package forplotting arbitrary 4D functions.Function w(x, y, z) is visualized as an animation where each frame is a 2D cross-section w(x, y, z=z_plot) with the fourth dimension represented by color.Example result:InstallViaPyPIpipinstallplot4dFunctionsplotter.plot4d_CSfor plotting a single cross-section for an arbitrary 4D functionplotter.plot4dfor generating an animation of cross-section plots for an arbitrary 4D functionInputs and returns are well documented in the docstrings.Quick StartBasic use examples can be found here:basic tour notebook.NotesInput parameter "frame" should be an instance of plotter.Frame2D as defined here:@dataclassclassFrame2D:xmin:float=0xmax:float=1ymin:float=0ymax:float=1xlabel:str="x"ylabel:str="y"xnum:int=20# number of sample points in the x directionynum:int=20# number of sample points in the y direction
Package: plotagain
PlotAgainThis package provides a simple contextmanager which automatically saves data used to make matplotlib plots and automatically generates a script to reproduce the plots at a later stage.Installpip install plotagainBasic UsageA SavePlotContext contextmanager can be used in conjunction with awithblock as shown below.fromplotagainimportSavePlotContextwithSavePlotContext("./data-save-dir",locals(),overwrite=True)asspc:spc.plot(...)...spc.title(...)spc.show()The resulting context managerspcsupport all matplotlib.pyplot function calls.
All calls made tospcare passed onto matplotlib.pyplot as-is and recorded.
The data save directory is dynamically created if it does not exist and is populated with pickle files containing the data used to make the plot.
The automatically generatedmake_plot.pyscript contains code which reloads all data and contains the necessary calls to matplotlib.pyplot used to create the original plot.
This script may then be modified to adjust the plot.
If the data save directory is not empty, an exception is raised unlessoverwrite=True.
Passing inlocals()allows SavePlotContext to infer the original variable names for the objects used for re-use inmake_plot.py.Note that only calls directly to spc are recorded, if you use figures and axes directly, you're on your own for now.
It is suggested that plots are kept simple in the scope of the code which generates them.
Once the individual plots have been generated it is easy to move around data and edit the autogenerated scripts to merge the individual plots using subplots.Example UsageimportnumpyasnpfromplotagainimportSavePlotContextx_data=np.linspace(0,2*np.pi,1000)y_data=np.sin(x_data)withSavePlotContext("./data-save-dir",locals(),overwrite=True)asspc:spc.plot(x_data,y_data,c='k',label='sin')spc.plot(x_data,np.cos(x_data),c='b',label='cos')spc.xlabel('xaxis')spc.ylabel('yaxis')spc.title('Title')spc.legend()spc.savefig('plot.pdf')spc.show()This will generate the following directory structuredata-save-dir/
  make_plot.py
  unnamed_arg.pkl
  x_data.pkl
  y_data.pklThe contents ofmake_plot.pywould beimportnumpyasnpimportmatplotlib.pyplotaspltfromplotagainimportload_picklex_data=load_pickle('x_data.pkl')y_data=load_pickle('y_data.pkl')unnamed_arg=load_pickle('unnamed_arg.pkl')plt.plot(x_data,y_data,c='k',label='sin')plt.plot(x_data,unnamed_arg,c='b',label='cos')plt.xlabel('xaxis')plt.ylabel('yaxis')plt.title('Title')plt.legend()plt.savefig('plot.pdf')plt.show()which should perfectly reproduce the original plot.
Note that the variable namesx_dataandy_dataare arbitrary and were inferred by the SavePlotContext instance using the locals() dict.
Good code structure will always allow SavePlotContext to infer the correct variable names.
Anonymous arguments, such as the y data of thenp.cosplot are simply saved and named "unnamed_arg" with an integer postfix if multiple unnamed arguments are present.MiscPlease report any bugs or feature requests tojero.wilkinson@gmail.com.
Package: plotai
🎨🤖 Create Python plots in matplotlib with LLM 🎨🤖🚀 Get Started•🤝 Issues•🐦 Twitter•👩‍💼 LinkedInPlotAI 🎨🤖The easiest way to create plots in Python and Matplotlib. Theplotaiis using LLM to generate code and plots.The idea:User provide input DataFrame and prompt.ThePlotAIconstructs a prompt for LLM which contains first 5 rows of DataFrame and user's prompt and asks for Python code as output.Returned Python code is executed and plot is displayed.https://github.com/mljar/plotai/assets/6959032/cb80bc35-e534-466d-aa1d-ce240d35f624Get startedInstallplotaipackage:pipinstallplotaiCreate.envfile with OpenAI API key:OPENAI_API_KEY=your-key-hereYou can also pass OpenAI API key in Pythonimportosos.environ["OPENAI_API_KEY"]="your-key-here"Importplotaiand make plots:# import PlotAIfromplotaiimportPlotAI# create PlotAI object, pass pandas DataFrame as argumentplot=PlotAI(df)# make a plot, just tell what you wantplot.make("make a scatter plot")More examplesAnalyze GPD datasetContents of video:https://github.com/mljar/plotai/assets/6959032/e62b1a26-7c91-40e4-9d2d-1a600d8dd7baAnalyze Iris dataset👩‍💼🐦 Connect with Us on LinkedIn & TwitterStay up-to-date with the latest updates about PlotAI 🎨🤖 by following us on Twitter (MLJAR Twitter) and LinkedIn (Aleksandra LinkedIn&Piotr LinkedIn). We look forward to connecting with you and hearing your thoughts, ideas, and experiences with PlotAI. Let's explore the future of AI together!⚠️ Limitations🛡 DisclaimerThis project, PlotAI, is provided "as-is" without any warranty, express or implied. By using this software, you agree to assume all risks associated with its use, including but not limited to data loss, system failure, or any other issues that may arise. The developers and contributors of this project do not accept any responsibility or liability for any losses, damages, or other consequences that may occur as a result of using this software.Please note that the use of the OpenAI language models can be expensive due to its token usage. By utilizing this project, you acknowledge that you are responsible for monitoring and managing your own token usage and the associated costs. It is highly recommended to check your OpenAI API usage regularly and set up any necessary limits or alerts to prevent unexpected charges.
Package: plot-and-log-memory-usage
plot_and_log_memory_usageScripts for logging CPU and GPU memory usage and subsequently plotting for analysis and debuggingInstallingInstall:pip install plot_and_log_memory_usageUsageLog Memory UsageLogs memory usage to a file at a given frequency and filepathlog_memory_usage --help

usage: log_memory_usage [-h] [--log-period-sec FLOAT] [--log-folderpath PATH] [--print-updates | --no-print-updates]

╭─ arguments ───────────────────────────────────────────────────────────╮
│ -h, --help              show this help message and exit               │
│ --log-period-sec FLOAT  (default: 5.0)                                │
│ --log-folderpath PATH   (default: /home/tylerlum/logged_memory_usage) │
│ --print-updates, --no-print-updates                                   │
│                         (default: True)                               │
╰───────────────────────────────────────────────────────────────────────╯Example:log_memory_usage

Logging to /home/tylerlum/logged_memory_usage/2024-01-13_02-24-22-299722.csv
2024-01-13_02-24-22-324923,7241.94140625,31747.50390625,784.0,4096.0
2024-01-13_02-24-27-381178,7046.80078125,31747.50390625,765.0,4096.0
2024-01-13_02-24-32-504417,7045.4765625,31747.50390625,765.0,4096.0
...Plot Logged Memory UsageCreates a plot of the memory usage from the log file for a given timerangeplot_logged_memory_usage --help

usage: plot_logged_memory_usage [-h] [OPTIONS]

╭─ options ─────────────────────────────────────────────────────────────╮
│ -h, --help              show this help message and exit               │
│ --end-datetime-str STR  (default: 2024-01-13_02-49-51-581943)         │
│ --start-datetime-str {None}|STR                                       │
│                         (default: None)                               │
│ --lookback-seconds {None}|FLOAT                                       │
│                         (default: None)                               │
│ --log-folderpath PATH   (default: /home/tylerlum/logged_memory_usage) │
│ --save-filepath {None}|PATH                                           │
│                         (default: None)                               │
╰───────────────────────────────────────────────────────────────────────╯You must specify either a start datetime (in the above format) OR lookback seconds (seconds before end datetime)Example:plot_logged_memory_usage --lookback-seconds 60plot_logged_memory_usage --start-datetime-str "2024-01-13_02-21-50-512677" --save-filepath "output.png"

Saving plot to output.png
Package: plotannot
plotannotIntroductionplotannotis a a python package to automatically highlight and adjust overlapping ticklabels in matplotlib/seaborn plots.This package started as the need of ComplexHeatmap (R package) style annotations for Python plots but is also created with great inspiration and appreciation of thestatannotpackage (webermarcolivier/statannot- now maintained attrevismd/statannotations), as well as theadjustTextpackage (Phlya/adjustText).FeaturesAdd annotation lines for certain row/column labelsShift labels to not overlapAdd additional highlights such as color, fontsize, etc. to certain row/column labelsGetting startedInstall from PyPI:pip install plotannotOr directly from github:pip install git+git://github.com/msbentsen/plotannotRequirements for package:Python >= 3.6matplotlibnumpySimple example#Plot heatmap
ax = sns.heatmap(table, xticklabels=True, yticklabels=False)

#Rotate all labels
plotannot.format_ticklabels(ax, axis="xaxis", rotation=45)

#Annotate labels
to_label = range(20,35)
plotannot.annotate_ticks(ax, axis="xaxis", labels=to_label) 

#Color individual labels
plotannot.format_ticklabels(ax, axis="xaxis", labels=[25], color="red")Additional examples are found in theexamples notebook.Documentation and helpDocumentation of the main functions are found at:Issues and PRs are very welcome - please use therepository issuesto raise an issue/contribute.
Package: plotapi
Engaging visualisations, made easy.Key Features•Get Access•Installation•Usage•DocsKey FeaturesPlotAPI Chord- Illustrate inter-relationships between data.PlotAPI SplitChord- Illustrate inter-relationships between bipartite data.PlotAPI Sankey- Illustrate the flow from one set of values to another.PlotAPI Terminus- Illustrate distributing something out amongst recipients.PlotAPI Bar Fight- A beautiful take on the classic Bar Chart Race.PlotAPI Pie Fight- A beautiful take on the classic Pie Chart Race.PlotAPI Heat Map- Beautiful and interactive heat maps.PlotAPI Line Fight- A beautiful take on the classic Line Chart Race.PlotAPI Pareto Front- Illustrate non-dominated (Pareto) fronts over time.PlotAPI Goal rush- Illustrate progress toward a goal over time.Upcoming Visualisations- Access to new visualisations as they are introduced.Supports Most Programming Languages- Get started with any language able to make HTTP requests.First-Class Python Support- Get started with pip install plotapiJupyter Lab/Notebook + Google Colab Support- Super-charge your notebooks with inline visualisations.Beautiful Themes & Fonts- Select from pre-made beautiful themes, or add your own.Share or Embed Interactive HTML- Download and embed your interactive visualisations.Upload and Share- Upload and share your visualisations, privately or publicly.Render to PDF, SVG, or PNG- Generate high-quality output ready for print.Record Animation to MP4 Video- Create social media-ready animated visualisations.Get AccessVisitthe websiteto get access to PlotAPI.InstallationGet up and running with Python with the following command.pipinstallplotapiUsageExample - Chord Prohttps://user-images.githubusercontent.com/15690380/126084021-b008b256-2a31-4106-84af-42777ea480d9.mp4Created with PlotAPIChord(matrix,names).show()The datamatrix=[[0,5,6,4,7,4],[5,0,5,4,6,5],[6,5,0,4,5,5],[4,4,4,0,5,5],[7,6,5,5,0,4],[4,5,5,5,4,0],]names=["Action","Adventure","Comedy","Drama","Fantasy","Thriller"]Example - Sankey Prohttps://user-images.githubusercontent.com/15690380/126084745-712fd744-b626-429d-85f3-30b11979fe30.mp4Created with PlotAPISankey(links).show()The datalinks=[{"source":"Salary","target":"Me","value":40000},{"source":"Freelance","target":"Me","value":10000},{"source":"Dividends","target":"Me","value":6000},{"source":"Me","target":"Rent","value":1100*12},{"source":"Me","target":"Food","value":300*12},{"source":"Me","target":"Magazine Subscription","value":2000},{"source":"Me","target":"Personal Tax","value":6000},{"source":"Me","target":"Investments","value":30000},{"source":"Investments","target":"Facebook","value":8000},{"source":"Investments","target":"Amazon","value":7000},{"source":"Investments","target":"Apple","value":6000},{"source":"Investments","target":"Netflix","value":5000},{"source":"Investments","target":"Google","value":4000},]LicenseMITPrefer not to code? Try the App at PlotAPI.complotapi.com· 
GitHub@shahinrostami· 
Twitter@shahinrostami· 
APolyrainnovation
Package: plotar
plotarplotar - Walk Through your Data in Cardboard VRThis is a prototype to get your data into a Google Cardboard and navigate using the computer keyboard.Disclaimer:This is in Alpha stage, lot of things can go wrong.
Data is transmitted in plain-text over you network and possibly further.Also the API is very instable.Free software: Affero GPL 3InstallationPrerequisites:Python 3 (we use Python 3.7)It is recommended to use a virtual environment:python-mvenvvenvsourcevenv/bin/activateThe source statement has to be repeated whenever you open a new terminal.Then install this versionpipinstall--upgradegit+https://github.com/thomann/plotar#egg=plotar&subdirectory=plotar-pyIf you want to use Jupyter, install it to the virtual environment:pipinstalljupyterlabDevelopmentTo install this module in Dev-mode, i.e. change files and reload module:gitclonehttps://github.com/thomann/plotarcdplotar/plotar-pyIt is recommended to use a virtual environment:python-mvenvvenvsourcevenv/bin/activateInstall the version in edit mode:pipinstall-e.In Jupyter you can have reloaded code when you change the files as in:%load_extautoreload%autoreload2Usageimportplotar# connect to running elastic or else start an Open Source stack on your dockerfromsklearnimportdatasetsiris=datasets.load_iris()plotar.plotar(iris.data,iris.target)In Jupyter you can open the controller:plotar.controller()FeaturesPandas based pipelineSupport for any extensions - now includes some for Regex, spaCy, VaderSentimentWrite results to ElasticSearchAutomatic Kibana dashboard generationHave Elastic started in Docker if it is not installed locally or remotelyApache License 2.0CreditsThis package was created withCookiecutterand the [audreyr/cookiecutter-pypackage]https://github.com/audreyr/cookiecutter-pypackageproject template.=======
History0.1.0 (2019-07-11)First Version
Package: plotarchive
plotarchivePlotarchive is a simple package which aims to assist plotters remeber what code created which figure.
We aim to eliminate the problem where the code you used to make a figure is lost or deleted.
Plotarchive serialises the data used to make the figure, along with the generating function, and the entire code of the project.To save your plot, wrap it in a function and apply the plotarchive.archive decorator. Plotarchive will save all the necessary information to recreate your plot.importplotarchiveimportmatplotlib.pyplotasplt@plotarchive.archive(file='myplot.pa')defplot(x,y,title):plt.figure()plt.plot(x,y)plt.title(title)plt.show()plot([1,2,3],[1,2,3])To re-generate your plot:importplotarchiveplotarchive.extract('myplot.pa')
Package: plotbbox
plotbboxA package to plot pretty bounding boxes for object detection taskInstallpipinstallplotbboxExample Usageimportcv2fromplotbboximportplotBBoximg=cv2.imread("your_img.png")label_table={0:"person",1:"car"}color_table={0:[0,255,0],1:[0,0,255]}# order: b, g, rbboxes=your_detection_algorithm(img)# Shape: (N, 5), [:, 0]: class index, [:, 1:]: xmin, ymin, xmax, ymaxforbboxinbboxes:class_idx=bbox[0]xmin,ymin,xmax,ymax=bbox[1:]plotBBox(img,xmin,ymin,xmax,ymax,color=color_table[class_idx],thickness=1,label=label_table[class_idx])# plot bounding box on imgcv2.imwrite("bboxes_plotted_your_img.png",img)Readdocs/example.pyand run for more details!
Package: plotbin
The PlotBin package contains utilities to plot binned maps and various
other general plotting utilities for two-dimensional maps.Installationinstall with:pip install plotbinWithout writing access to the globalsite-packagesdirectory, use:pip install --user plotbinDocumentationSee the files headers.LicenseCopyright (c) 2013-2022 Michele CappellariThis software is provided as is without any warranty whatsoever.
Permission to use, for non-commercial purposes is granted.
Permission to modify for personal or internal use is granted,
provided this copyright and disclaimer are included in all
copies of the software. All other rights are reserved.
In particular, redistribution of the code is not allowed.
Package: plotbook
PlotbookPlotbook allows you to make beautiful plots in Jupyter notebook interactively via ipywidgets. It helps people make beautiful plots faster, especially those who routinely use packages such as matplotlib, plotly, and seaborn. Some highlights:Plot type inference: automatically infer the possible types of plot given the input data.Use widgets to do fine-tuning.InstallationYou can install via pip:pip install plotbookIn order for widgets to work, make sure you also need to install the following jupyter extensions:jupyter nbextension install jupyter-js-widgets plotlywidgetCheck if the extensions are enabled:jupyter nbextension listDemosExample images in the jupyter notebook:
Package: plotcap
PlotCap - a simple network visualization tool.Table of ContentsIntroductionUsageAPILimitationsIntroductionPlotCap is a simple command line tool written in Python and based on PyVis, that parses network capture files (produced by tools such as tcpdump or Wireshark) to render a graph of the network topology in a web page.PlotCap was designed for red team engagements, with the aim of quickly mapping out relationships between devices (“nodes”) in a network.
Target groups are: network administrators, penetration testers and curious people.Visualization can be performed at layer 2 (MAC addresses) and layer 3 (IP addresses).
Layer 2 is the default. The tool attempts to resolve MAC addresses unless directed otherwise.Usageplotcap-fcapture.capThis is equivalent to:plotcap-fcapture.cap--layer2or:plotcap-fcapture.cap--layer2--resolve-ouiDo not resolve MAC addresses:plotcap-fcapture.cap--layer2--no-resolve-ouiShow IP addresses:plotcap-fcapture.cap--layer3APIA convenience API is available if you just want to parse the .pcap file and reuse the results, but don’t want a graphical representation.fromplotcap.apiimportparse_filepcap_file="/tmp/test.pcap"conversations=parse_file(pcap_file=pcap_file,layer=2)forconversation,packet_countinconversations.items():print(f"src:{conversation.src}- dst:{conversation.dst}- packets:{packet_count}")LimitationsAlthough this is a command line tool, it requires a graphical environment and a web browser to render network maps. On headless systems we suggest using Xvfb to set up virtual sessions.PlotCap was tested on Linux onlyMAC addresses may not always be resolved to manufacturer names, especially if address randomization comes into playSee the TODO file for more missing features