Saravanan666/pypi-org huggingface dataset:
Package: plotcat
plot-cat is the python library for plotting live serial input. plotcat works onpython 2.7 and later. plotcat comes handy when you want to plot live data thatis coming form different sensors over the serial port, SPI, websocket, tcp socket etc.For example you have to plot the output of a temperature sensor that is comingfrom an [arduino](https://www.arduino.cc/) or any other microcontroller forthat matter; plotcat comes handy for such tasks.plotcat sits on the top of [matplotlib](http://matplotlib.org/) and does allthe initialization and drawing stuff itself. you just have to provide the listof values to be plotted.plotcat works on linux osx and windows. plotcat also works well with[Raspberry Pi](https://www.raspberrypi.org/)## install plotcatfrom pip```bashpip install plotcat```or from github```bashgit clone https://github.com/girish946/plot-cat.gitpip install -r requirements.txtpython install setup.py install```on fedora 22 and above```bashdnf copr enable girish946/plotcatdnf install python-plotcat```for ubuntu```bashwget https://github.com/girish946/plot-cat/blob/master/dist/python-plotcat_1.0.0.1-1_all.debsudo dpkg -i python-plotcat_1.0.0.1-1_all.deb```Home-page: UNKNOWNAuthor: girish joshiAuthor-email: girish946@gmail.comLicense: GPL v3Description-Content-Type: UNKNOWNDescription: tool to plot live serial inputKeywords: serial input plotting realtime data matplotlib Raspberry_piPlatform: UNKNOWN
Package: plotchecker
# plotchecker[![Build Status](https://travis-ci.org/jhamrick/plotchecker.svg?branch=master)](https://travis-ci.org/jhamrick/plotchecker)[![codecov.io](http://codecov.io/github/jhamrick/plotchecker/coverage.svg?branch=master)](http://codecov.io/github/jhamrick/plotchecker?branch=master)[![Documentation Status](https://readthedocs.org/projects/plotchecker/badge/?version=latest)](http://plotchecker.readthedocs.org/en/latest/?badge=latest)A set of utilities for checking and grading matplotlib plots. **Please note that `plotchecker` is only compatible with Python 3, and not legacy Python 2**. Documentation is available on [Read The Docs](https://plotchecker.readthedocs.org/).## InstallationTo install `plotchecker`:```pip3 install plotchecker```## BackgroundThe inspiration for this library comes from including plotting exercises in programming assignments. Often, there are multiple possible ways to solve a problem; for example, if students are asked to create a "scatter plot", the following are all valid methods of doing so:```python# Method 1plt.plot(x, y, 'o')# Method 2plt.scatter(x, y)# Method 3for i in range(len(x)):plt.plot(x[i], y[i], 'o')# Method 4for i in range(len(x)):plt.scatter(x[i], y[i])```Unfortunately, each of the above approaches also creates a different underlying representation of the data in matplotlib. Method 1 creates a single Line object; Method 2 creates a single Collection; Method 3 creates *n* Line objects, where *n* is the number of points; and Method 4 creates *n* Collection objects. Testing for all of these different edge cases is a huge burden on instructors.While some of the above options are certainly better than others in terms of simplicity and performance, it doesn't seem quite fair to ask students to create their plots in a very specific way when all we've asked them for is a scatter plot. If they look pretty much identical visually, why isn't it a valid approach?Enter `plotchecker`, which aims to abstract away from these differences and expose a simple interface for instructors to check students' plots. All that is necessary is access to the `Axes` object, and then you can write a common set of tests for plots independent of how they were created.```pythonfrom plotchecker import ScatterPlotCheckeraxis = plt.gca()pc = ScatterPlotChecker(axis)pc.assert_x_data_equal(x)pc.assert_y_data_equal(y)...```Please see the [Examples.ipynb](Examples.ipynb) notebook for futher examples on how `plotchecker` can be used.Caveats: there are *many* ways that plots can be created in matplotlib. `plotchecker` almost certainly misses some of the edge cases. If you find any, please submit a bug report (or even better, a PR!).
Package: plotclassification
Plots of Classifier Performance :-
When it comes to machine learning and deep learning task there are many ways to plot the performance of a classifier.
There is  metrics to compare different estimators like accuracy, precision, recall and f1 score.All of the common classification metrics are calculated from true positive, true negative, false positive and false negative incidents. The most popular plots are definitely ROC   curve, PRC and the confusion matrix.There are four ways to check if the predictions are right or wrong:1.TN/TrueNegative:thecasewasnegativeandpredictednegative2.TP/TruePositive:thecasewaspositiveandpredictedpositive3.FN/FalseNegative:thecasewaspositivebutpredictednegative4.FP/FalsePositive:thecasewasnegativebutpredictedpositivePrecision:-Accuracyofpositivepredictions=TP/(TP+FP)Recall:-Fractionofpositivesthatwerecorrectlyidentified=TP/(TP+FN)F1Score=2*(Recall*Precision)/(Recall+Precision)User installation :If you already have a working installation of numpy and pandas, the easiest way to install plotly_ml_classification is using pippipinstallplotclassificationThis package depend on other packages:1.numpy2.pandas3.sklearn4.plotlyUsage# import librariesimportplotclassificationfromsklearnimportdatasetsfromsklearn.linear_modelimportLogisticRegressionfromsklearn.model_selectionimporttrain_test_split# Load datairis=datasets.load_iris()# Create feature matrixfeatures=iris.data# Create target vectortarget=iris.target#create list of classnameclass_names=iris.target_namesclass_names# Create training and test setx_train,x_test,y_train,y_test=train_test_split(features,target,test_size=0.9,random_state=1)# Create logistic regressionclassifier=LogisticRegression()# Train model and make predictionsmodel=classifier.fit(x_train,y_train)# create predicted probabilty matrixy_test__scores=model.predict_proba(x_test)# initialize parameters valueplot=plotclassification.plot(y=y_test,y_predict_proba=y_test__scores,class_name=['Class 1','class 2','class 3'])plot.class_name['Class 1','class 2','class 3']# classification report plotplot.plot_classification_report()#  confusion matrix plotplot.plot_confusion_matrix()# precision recall curve plotplot.plot_precision_recall_curve()# roc plotplot.plot_roc()# predicted probability histogram plotplot_probability_histogram()Github file sourceChange Log0.0.1 (06/03/2021)First Release
Package: plotcollector
PlotcollectorPlotcollector is a Python module that provides a simple GUI to collect all matplotlib figures into a single interactive window and save them in a PowerPoint Presentation or PDF file by the simple press of a button.plotcollector is most useful when dealing with many plots where the sheer amount of individual windows is unmanageable and yet interactivity is needed.InstallationUse the package managerpipto install plotcollector.pipinstallplotcollectorUsageimportplotcollectorasplc#this goes after all figures have been created#Note the rest of the script won't continue until the#plotcollector window is closedplc.view()Using the Spyder IDERunning PyQt apps in spyder currently results in incorrect sys exit behaviour when the IPython Console Graphics Backend is not set as "Inline".
To make sure plotcollector operates correctly in spyder be sure to change the graphics backend as:Tools -> Preferences --> IPython Console -> Graphics --> Graphics Backend as InlineContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.License[MIT License]
Package: plot-confusion-matrix
Simple confusion matrixPlot a simple confusion matrix using matplotlibUsage:confusion_matrix(matrix,labels)labelsis optional.
Returns a matplotlib FigureExample:fromplot_confusion_matriximportconfusion_matrixfrommatplotlibimportpyplotmatrix=[[5,2,0],[1,2,3],[2,1,6]]confusion_matrix(matrix)pyplot.show(block=True)Output:confusion_matrix(matrix,["A","B","C"])
Package: plot-context-manager
plot_context_managerplot_context_manageris a package to work with plots as with context managers.PrerequisitesBefore you begin, ensure you have installed the latest version of Python.Installingplot_context_managerTo installplot_context_manager, follow these steps:Linux and macOS:pip3 install plot-context-managerWindows:pip install plot-context-managerUsingplot_context_managerThere are will be examples of how to useplot_context_manager.Contributing toplot_context_managerTo contribute toplot_context_manager, follow these steps:Fork this repository.Create a branch:git checkout -b <branch_name>.Make your changes and commit them:git commit -m '<commit_message>'Push to the original branch:git push origin <project_name>/<location>Create the pull request.Alternatively see the GitHub documentation oncreating a pull request.Contributors@AlbertFarkhutdinovContactIf you want to contact me you can reach me atalbertfarhutdinov@gmail.com.LicenseThis project uses the following license:MIT License.
Package: plot-coverage
plot_coveragePython package to generate plots from coverage reportGenerate visual plots to demonstrate your code coverage. Interactive plots are opened in the browser immediately
after running the script. HTML files for the plots are stored alongside the coverage report insidehtmlcovfolder.Plots are generated using plotly express.UsageInstall usingpip install plot-coverageFrom the project root (where htmlcov folder is located), run:plot_coverage –plot=treemapplot_coverage –plot=sunburstNote: Make sure htmlcov/index.html is present at the root of your project before running the above. So,coverage htmlshould be run before attempting this.ExampleTreemapSunburstFeaturesGenerate Treemap plot for showing your coverage report with color sequence based on coverage percentage.Generate Sunburst plot for showing your coverage report with color sequence based on coverage percentage.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Free software: BSD licenseHistory1.0.0 (2020-06-25)First release on PyPI.
Package: plotcp
PlotComplexPlanePython library for plotting complex functions transformationsIt can...plot complex planes (both transformed and original)plot transformations of specific areas (both transformed and original)plot lines parallel to real or imaginary axis (both transformed and original)UsageplotcpTo plot f(z) = (z+1)/z with x bound from -4 to 4 and y bound from -4 to 4fromplotcpimportplotcpdeff(z:complex)->complex:# Define function to plotreturn(z+1)/z# Call plotcp# Second and third arguments define limits of a plotax=plotcp(f,(-4,4),(-4,4))For full parameters list checkhelp(plotcp.plotcp)plot_complex_pointsfromcmathimportsinimportmatplotlib.pyplotaspltimportnumpyasnpfromplotcpimportplot_complex_pointsdeff(z:compex)->complex:# Define function to plotreturnsin(z)# Define area to be plottedtop=[x+2*1jforxinnp.linspace(1,2,5)]bottom=[x+1*1jforxinnp.linspace(1,2,5)]left=[1+y*1jforyinnp.linspace(1,2,5)]right=[2+y*1jforyinnp.linspace(1,2,5)]# Plot original areaax=plot_complex_points(top)ax=plot_complex_points(bottom,ax=ax)ax=plot_complex_points(left,ax=ax)ax=plot_complex_points(right,ax=ax)# Apply function to area and plot it on a new plotax2=plot_complex_points([f(z)forzintop])ax2=plot_complex_points([f(z)forzinbottom],ax=ax2)ax2=plot_complex_points([f(z)forzinleft],ax=ax2)ax2=plot_complex_points([f(z)forzinright],ax=ax2)plt.show()For full parameters list checkhelp(plotcp.plot_complex_points)
Package: plotdevice
PlotDevice is a Macintosh application used for computational graphic design. It
provides an interactive Python environment where you can create two-dimensional
graphics and output them in a variety of vector, bitmap, and animation formats.
It is meant both as a sketch environment for exploring generative design and as
a general purpose graphics library for use in external Python programs.PlotDevice scripts can create images from simple geometric primitives, text, and
external vector or bitmap images. Drawing commands provide a thin abstraction
over macOS's Quartz graphics engine, providing high-quality rendering
of 2D imagery and powerful compositing operations.PlotDevice is a fork of NodeBox 1.9.7rc1 with support for modern versions of
Python and Mac OS.The new version features:Runs natively on Intel and Apple Silicon and supports retina displaysPython 3 only (including a bundled 3.10 installation in the app)images can now be exported in HEIC format and videos support H.265 (HEVC)SVG files can now be drawn to the canvas using theimage()command (thanks to the magicalSwiftDrawlibrary)image exports have a configurablezoomto create 2x/3x/etc ‘retina’ imagesrevampedvar()command for creating GUIs to modify values via sliders, buttons, toggles, etc.updated text editor with multiple tabs, new themes, and additional key-binding modes emulating Sublime Text and VS Codethe module's command line interface is now accessible throughpython3 -m plotdevicethe command line tool has a new--installoption to downloadPyPIpackages for use within the appdocument autosaving is now user-configurableBugfixes and misc. improvements detailed in thechangelogVersion 0.9.5 added:Python 3 compatibleCan now be built with system Python or Homebrew versions of the interpreterMuch faster import times on Yosemite thanks to a bundled copy of PyObjC 3.0.4HTTP is now handled by therequestsmodule and caches responses locallyTotally revamped typography system with support for OpenType features,
pagination, multi-column text, character geometry, and moreAdded 130+ unit tests (run them withpython setup.py test) plus bugfixes for
formeasure(),textpath(),Bezier.fit(),read(), and the Preferences dialogVersion 0.9.4 added:Enhanced command line interface.New text editor with tab completion, syntax color themes, and emacs/vi bindings.Video export in H.264 or animated gif formats (with GCD-based i/o).Added support for external editors by reloading the source when changed.Build system now works with Xcode orpy2appfor the application andpipfor the module.Virtualenv support (for both installation of the module and running scripts with dependencies).External scripts can usefrom plotdevice import *to create a drawing environment.Simplified bezier & affine transform api using the python ‘with’ statementNew compositing operations for blend mode, global opacity, and dropshadowsSimplified typography commands with stylesheet-based character stylesNow uses the system's Python 2.7 interpreter.Requirements:Mac OS X 11+Python 3.6+
Package: plotEnv
plotenvPython plotting wrapper utilizing matplotlib and seabornChangelog0.1:ported to python3cleaned up customizationadded default matplotlib colors0.0.2.dev1:addedexamples: basic single line plot, multi-line plot and contourf plotreorganized modulesadded custom cosmic microwave background (CMB) colormap0.0.1.dev2:addedplotenv: custom plotting wrapperAuthors* Lento Manickathan (lento.manickathan@gmail.com)Dependenciespython:python 3.6.xpython requirement:The following python modules must be installed:
    * numpy
    * matplotlib (plotting)
    * seaborn (plotting)InstallationTo install the development version, runpip install plotenvor alternativelypip install git+git://github.com/lento234/plotenv.git
Package: plotestrem
PlotestremSmall Python script for rapidly fitting data in the context of experimental sciences. With Plotestrem, you can easily fit (almost) any function and get a beautiful and scalable graphic. The axes are completely LaTeX-friendly, so you can use any packages you want. It also means you can use the same font as your main document.For now, the equation is only generated for linear and exponential fitting, which should be sufficient for many applications. Maybe in the future I'll add more support.This code is quite old, so it's not well-written, but it works.UsageYou'll need Python 3 installed and a LaTeX distribution. Then install the package:pip3installplotestremOnce you have everything set up, openrunner.py, add your data and run.Yeah, it have no interface. Maybe one day. Who knows.Fitting typesYou can fit the data using three builtin fitters, or provide your own function. You just need to passfit_typeaccordingly."linear": linear fit, will plot a line and show the parameters for they = a * x + bequation;"exp": exponential fit, will plot the exponential function and show the parameters for they = a * exp(-b * x) + cequation;"none": no fitting. It just skips the regression. Your data will be plotted as a scatter plot;Lastly, you can provide a function (a lambda or just the name of an existing function, without the parenthesis) to be used in the fitting. For now, the program shows only the R² value (not the parameters) for user-defined functions, but this is an interesting feature to have in the future. Also, the function to be passed should be in the formf(x, *fit), withfitbeing the coefficients. For example, a linear function would be passed as af(x, a, b).WhyPlotestrem?It's how amineiro(native of Minas Gerais -- Brasil) would say "Plot this thing".Hereyou can listen a canonical speech, but it's not correct (as it's notmineiro).This oneis a little better.AuthorDeveloped byHeliton Martins.
Package: plotext
plotextplots directly on terminalit allows forscatter,line,bar,histogramanddate-timeplots (includingcandlestick),it can also ploterror bars,confusion matrices, and add extratext,linesandshapesto the plot,you could use it toplot images(includingGIFs) andstream videowith audio (includingYouTube),it cansave plotsas text or as coloredhtml,it provides a simple function tocolor strings,it comes with a dedicatedcommand line tool,it hasno dependencies(except for optional dependencies for image/video plotting).Theinstalling instructionsarehereand the image codehere.GuideIntroductionMain PlotsBasic PlotsBar PlotsDatetime PlotsSpecial PlotsDecorator PlotsImage PlotsPlay VideosPlotting  UtilitiesSettingsAspectSubplotsOther  ResourcesUtilitiesEnvironmentsNotesSome interestinglife questions
Package: plotextractor
AboutA small library for extracting plots used in scholarly communication.Install$pipinstallplotextractorUsageTo extract plots from a tarball:>>>fromplotextractorimportprocess_tarball>>>plots=process_tarball('./1503.07589.tar.gz')>>>print(plots[0]){'captions':[u'Scans of twice the negative log-likelihood ratio $-2\\ln\\Lambda(\\mH)$ as functions of the Higgs boson mass\\mH\\for the ATLAS and CMS combination of the\\hgg\\(red),\\hZZllll\\(blue), and combined (black) channels. The dashed curves show the results accounting for statistical uncertainties only, with all nuisance parameters associated with systematic uncertainties fixed to their best-fit values. The 1 and 2 standard deviation limits are indicated by the intersections of the horizontal lines at 1 and 4, respectively, with the log-likelihood scan curves.',],'label':u'figure_LHC_combined_obs','name':'LHC_combined_obs_unblind_final','original_url':'./1503.07589.tar.gz_files/LHC_combined_obs_unblind_final.pdf','url':'./1503.07589.tar.gz_files/LHC_combined_obs_unblind_final.png',}NotesIf you experience frequentDelegateErrorerrors you may need to update your version
of GhostScript.LicenseGPLv2ChangesVersion 0.2.2 (2019-10-24)Try to preserve the ordering of figures.Version 0.2.1 (2018-09-07)Handle utf-8 in paths inside the tarball.Version 0.2.0 (2018-02-07)Ignore hidden/metadata files in the tarball.Handle relative paths in the tarball.Version 0.1.6 (2016-12-01)Sets the mtime for all members of the tarball to current time before
unpacking.Version 0.1.5 (2016-05-25)Properly raises an exception when no TeX files are found in an archive.More fixes to image path extraction and more robust image handling.Version 0.1.4 (2016-03-22)Fixes linking images from TeX reference when images are referred
to without specifying full relative folder path.Version 0.1.3 (2016-03-17)Properly supports cases where images are located in
a nested folder inside the extracted tarballs root folder.Version 0.1.2 (2015-12-08)Adds wrapfigure support.Catches problems with image conversions.More robust handling of image rotations in TeX sources.Removes unicode_literals usage.Version 0.1.1 (2015-12-04)Improves extraction from TeX file by reading files with encoding.Version 0.1.0 (2015-10-19)Initial export from Invenio Software <https://github.com/inveniosoftware/invenio>Restructured into stripped down, standalone version
Package: plotfa
plotfaplotfa defines a set of helper functions that will aid you in creating crisp and beautiful plots in Persian, using seaborn (preferably) or pure matplotlib.Installationplotfa can be installed usingpip:pip install plotfaBasic UsageAfter installingplotfa, we simply import it at the top of our file:importplotfaIt's important to note that any bit of persian text
that we want shown on the plot,mustpass through theplotfa.fa()function. For simplicity, we explicitly import this function on the top:fromplotfaimportfaNow, let's say we want to create a little bar plot using seaborn, so:importseabornassnsfromplotfaimportfarsiasfaimportplotfasns.set_style('darkgrid')# Set plot's settingsplotfa.set_font('B Yekan')# It defaults to B Yekan alreadyplotfa.prettify()# To make our plots look better# We must wrap persian strings with the fa() functiony=[fa('میله‌ی اول'),fa('میله‌ی دوم'),fa('میله‌ی سوم')]x=[10,20,15]sample_plot=sns.barplot(x,y)# save the returned plot object# pass the plot object into modify_plot and set its title and labelsplotfa.modify_plot(plot=sample_plot,title=fa('پلاتفا'),xlabel=fa('تعداد'),ylabel=fa('اسم میله'))Running the above code, will result in the following plot:
Package: plotgpt
Introducing PlotGPT, a lightweight AI assistant to help you visualize your data.Built on top of langchain and openaiCurrently it will (most likely) only support plotting in matplotlib and seabornQuickstartTo get started, all you need to do is give PlotGPT a pandas dataframe to inspect.importseabornassnsdf=sns.load_dataset('iris')ai=PlotGPT()ai.inspect(df)And then ask it to start plotting.ai.ask("plot sepal width vs sepal length")PlotGPT will remember previous prompts (up to a certain point), so you can build off of previous plots, mimicking iterative explorate data analysis.ai.ask("now colored it by specied")By default, PlotGPT will return the plotting code. You can turn it off by setting theshow_codeflag.ai=PlotGPT(show_code=False)However, it is this author's recommendation to leave this setting on be able to sanity check the plots.QuestionsShould this completely replace my data analysis?Probably not. Since this is an LLM, it's definitely not perfect. I'm more envisioning this as empowering initial discovery, where we use the AI to create a series of initial exploratory visualizations, and then have the human take over once you want to go deeper / more nuanced.
Package: plot-gsheets
plot-gsheetsplot-gsheets is a small wrapper around the Google Sheets API (v4) to provide more convenient way to plot Google Sheets from Python scripts.LinksGithub:https://github.com/karatuno/plot-gsheetsPyPi:https://pypi.org/project/plot-gsheets/InstallationThis package runs under 3.5+, usepipto install:pipinstallplot-gsheetsUsageImporting plot_gsheets>>>importplot_gsheetsGet all columns of google sheetSyntax:plot_gsheets.get_columns(SPREADSHEET_ID,sheet_name)whereSPREADSHEET_IDcan be found like here in you google sheet URL:https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit#gid=0andsheet_namecan be found at the bottom left of windowexample:>>>plot_gsheets.get_columns('1SrZfvr2ee54r7HR1jGtAE9zHIj_Y-UzK9ok8bdwkpqc','Sheet1')['timestamp','average_sales','offer_price']Plot by specifying columnsSyntax:plot_gsheets.plot_sheet_columns(SPREADSHEET_ID,sheet_name,x_column_name,y_column_name)sheet columns can be found by usingplot_gsheets.get_columnsand thusx_column_name,y_column_namecan be specified by seeing outputexample :>>>plot_gsheets.plot_sheet_columns('1SrZfvr2ee54r7HR1jGtAE9zHIj_Y-UzK9ok8bdwkpqc','Sheet1','timestamp','average_sales')plot will be saved asplot.pngGoogle colab example :https://colab.research.google.com/drive/1yIW8wunsHVJiwRKltNQ7fBi9ph37Xqu2?usp=sharing