recentpopularlog in

kme : plotting   50

Rotating custom tick labels — Matplotlib 3.1.3 documentation
This might be enough:
<code class="language-python">
plt.subplots_adjust(bottom=0.25)
</code>

<code class="language-python">import matplotlib.pyplot as plt

x = [1, 2, 3, 4]
y = [1, 4, 9, 6]
labels = ['Frogs', 'Hogs', 'Bogs', 'Slogs']

plt.plot(x, y)
# You can specify a rotation for the tick labels in degrees or with keywords.
plt.xticks(x, labels, rotation='vertical')
# Pad margins so that markers don't get clipped by the axes
plt.margins(0.2)
# Tweak spacing to prevent clipping of tick-labels
plt.subplots_adjust(bottom=0.15)
plt.show()</code>
python  plotting  matplotlib  ticks  ticklabels  annoyance  solution 
23 days ago by kme
Bioconductor - motifStack | https://bioconductor.org/
I needed to uninstall R 3.4.1 from MacPorts and use the official R 3.4.1 installer from https://cran.r-project.org/bin/macosx/.

The gfortran package at https://cran.r-project.org/bin/macosx/tools was NOT required.
r  bioconductor  sequencelogo  bioinformatics  motifs  plotting 
september 2017 by kme
user interface - How to draw vertical line on axes in Matlab GUI? - Stack Overflow
My solution was:
axdim = axis;
line([30,30], axdim(3:4), 'linewidth', 2.5, 'color', 'm');
matlab  plotting  graphics  solution 
february 2017 by kme
Using gnuplot to display data in your Web pages
plot "sarx.txt" using 1:2 title "%user", '' using 1:3 title "%sys"
gnuplot  tutorial  graphics  plotting  sysadmin  unix  commandline 
october 2015 by kme
How do I get the handles of all open figures in MATLAB - Stack Overflow
There are a few ways to do this. One way to do this is to get all the children of the root object:

figHandles = get(0,'Children');

Or you could use the function FINDOBJ:

figHandles = findobj('Type','figure');

If any of the figures have hidden handles, you can instead use the function FINDALL:

figHandles = findall(0,'Type','figure');
matlab  programming  graphics  plotting  solution 
april 2013 by kme
image processing - Changing Transparent Background to White in Matlab - Stack Overflow
I = imread('file.png', 'BackgroundColor',[1 1 1]); imwrite(I, 'file.jpg')

[0.5,0.5,0.5] for 50% grey.
matlab  graphics  png  transparency  plotting  solution 
april 2013 by kme
line - Matlab code to draw a tangent to a curve - Stack Overflow
function test hh figure 1 ; clf, hold on grid on x 0:0.01:2*pi; f @ x sin x ; fprime @ x cos x ; plot x, f x , r axis tight D ; L ; set hh, ... WindowButtonMotionFcn , @mouseMove,... WindowButtonDownFcn , @mouseClick ; function mouseMove varargin coords get gca, currentpoint ; xC coords 1 ; if ishandle D delete D ; end D plot xC, f xC , ko ; end function mouseClick obj, varargin switch get obj, selectiontype % actions for left mouse button case normal coords get gca, currentpoint ; xC coords 1 ; yC f xC ; a fprime xC ; b yC-a*xC; if ishandle L delete L ; end L line 0; 2*pi , b; a*2*pi+b ; case alt % actions for right mouse button case extend % actions for middle mouse button case OPEN % actions for double click otherwise % actions for some other X-mouse-whatever button end end end
matlab  plotting  tangentline  tangent  math  solution  interactive 
february 2013 by kme

Copy this bookmark:





to read