![]() ![]() Again credit for the original solution goes to the answer for Matplotlib overlapping annotations. With a lot of fiddling, I figured it out. Here is the example image: import matplotlib.pyplot as pltĪdjust_text(texts, only_move=, force_points=0.15,Īrrowprops=dict(arrowstyle="->", color='r', lw=0.5)) I just wanted to post here another solution, a small library I wrote to implement this kind of things: Īn example of the process can be seen here: Images (if this works) can be found here (this code): P1 = plt.plot(eucs,covers,color="black", alpha=0.5) Plt.ylabel("Percentage Timewindows Attended") Plt.xlabel("Proportional Euclidean Distance") I'm having trouble converting the "axis" methods over to what I want to do, and I don't understand how the text lines up. ![]() The method suggested in the accepted answer to Matplotlib overlapping annotations looks extremely promising, however is for bar graphs. I'm also using the test data that the creators of TOBIAS provide when running this command, so this error is likely not resulting from an error with the files I am providing as inputs to the command.I'm trying to stop annotation text overlapping in my graphs. I tried uninstalling and reinstalling matplotlib using pip ( pip uninstall matplotlib and pip install matplotlib, respectively), but I still get the same error. I tried upgrading matplotlib using pip install -upgrade matplotlib but I already have the latest version, 3.7.1. ![]() Text._init_(self, x, y, text, **kwargs)įile "/home/usrname/.local/lib/python3.10/site-packages/matplotlib/_api/deprecation.py", line 454, in wrapperįile "/home/usrname/.local/lib/python3.10/site-packages/matplotlib/text.py", line 183, in _init_įile "/home/usrname/.local/lib/python3.10/site-packages/matplotlib/text.py", line 231, in updateįile "/home/usrname/.local/lib/python3.10/site-packages/matplotlib/artist.py", line 1213, in updateįile "/home/usrname/.local/lib/python3.10/site-packages/matplotlib/artist.py", line 1197, in _update_propsĪttributeError: 'Annotation' object has no property 'text_from_points' 08:54:45 (488) - Bcell / Tcell (static plot)įile "/home/usrname/.local/bin/TOBIAS", line 8, in įile "/home/usrname/.local/lib/python3.10/site-packages/tobias/TOBIAS.py", line 154, in mainįile "/home/usrname/.local/lib/python3.10/site-packages/tobias/tools/bindetect.py", line 819, in run_bindetectįig = plot_bindetect(motif_list, clustering,, args)įile "/home/usrname/.local/lib/python3.10/site-packages/tobias/tools/bindetect_functions.py", line 769, in plot_bindetectĪdjust_text(txts, ax=ax1, add_objects=, text_from_points=True, arrowprops=dict(arrowstyle='-', color='black', lw=0.5)) #, expand_text=(0.1,1.2), expand_objects=(0.1,0.1))įile "/home/usrname/.local/lib/python3.10/site-packages/adjustText/_init_.py", line 730, in adjust_textįile "/home/usrname/.local/lib/python3.10/site-packages/matplotlib/axes/_axes.py", line 699, in annotateĪ = mtext.Annotation(text, xy, xytext=xytext, xycoords=xycoords,įile "/home/usrname/.local/lib/python3.10/site-packages/matplotlib/text.py", line 1885, in _init_ However, I get the following error in my output: 08:54:45 (488) Writing all_bindetect files TOBIAS BINDetect -motifs test_data/motifs.jaspar -signals test_data/Bcell_footprints.bw test_data/Tcell_footprints.bw -genome test_data/genome.fa -peaks test_data/merged_peaks_annotated.bed -peak_header test_data/merged_peaks_annotated_header.txt -outdir BINDetect_test -cond_names Bcell Tcell -cores 4 I tried to run the last step of the pipeline, BINDetect, using the following command: ![]() I am attempting to run TOBIAS, a collection of command-line bioinformatics tools, to analyze my sequencing data from ATAC-seq. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |