labels

Add secondary X axis labels to ggplot with one X axis

筅森魡賤 提交于 2019-11-28 01:31:39
**Edit, there are two great solutions here, one is marked as the answer, but @hrbrmstr provides a great solution combining two ggplots which works well for this simple plot.* Here's the code breaks.major <- c(0,15,37.5,52.5,67.5,82.5,95,100) #defines the midpoints of the categories (label locations) breaks.minor <- c(30,45,60,75,90) #defines the edges of the categories (second label set I need) labels.minor <- c("","Extremely \nDissatisfied","Dissatisfied","Uncertain","Satisfied","Very \nSatisfied","Extremely \nSatisfied","") lims =c(0,100) g <- ggplot(mpg, aes(class))+ geom_bar()+ coord_flip(

matplotlib: adding padding/offset to polar plots tick labels

孤街浪徒 提交于 2019-11-27 22:59:40
Is there a way to increase the padding/offset of the polar plot tick labels (theta)? import matplotlib import numpy as np from matplotlib.pyplot import figure, show, grid # make a square figure fig = figure(figsize=(2, 2)) ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c') ax.set_yticklabels([]) r = np.arange(0, 3.0, 0.01) theta = 2*np.pi*r ax.plot(theta, r, color='#ee8d18', lw=3) ax.set_rmax(2.0) show() I'd like to have theta tick labels further away from the polar plot so they don't overlap. First of all; seeing as how you have specified the figsize to be (2,2) and having

HighCharts: Labels visible over tooltip

一世执手 提交于 2019-11-27 12:51:09
Labels on my chart are showing over tooltip, which doesn't look very nice. I tried to play with zIndex , but to no result. How can I make tooltips not transparent? Here's my jsFiddle: http://www.jsfiddle.net/4scfH/3/ $(function() { var chart; $(document).ready(function() { chart = new Highcharts.Chart({ chart: { renderTo: 'graf1', plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { margin: 40, text: 'Podíl všech potřeb' }, tooltip: { //pointFormat: '<b>{point.y} Kč [{point.percentage}%]</b>', percentageDecimals: 2, backgroundColor: "rgba(255,255,255,1)", formatter:

Python matplotlib decrease size of colorbar labels

为君一笑 提交于 2019-11-27 12:17:23
I need your help! I have a plotting code which is the following: fig = plt.figure() ax1 = fig.add_subplot(111) imax1 = ax1.imshow(data,interpolation = 'nearest', origin = 'lower',cmap=cm.jet)#plot cbar = plt.colorbar(imax1, extend='neither', spacing='proportional', orientation='vertical', shrink=0.7, format="%.0f") cbar.set_label(r"ET [mm/month]", size=10) titlestr = "Evapotranspiration in mm/month" plt.title(titlestr) #plt.xlabel("Longitude") #plt.ylabel("Latitude") imax1.set_clim(0,60) labels = [item.get_text() for item in ax1.get_xticklabels()] for ii in range(np.shape(labels)[0]): labels

CSS to align label and input

≡放荡痞女 提交于 2019-11-27 09:36:26
问题 HTML Code Snippet: <fieldset id="o-bs-sum-buginfo"> <label for="o-bs-sum-bug-ErrorPrefix">Error Prefix</label> <input type="text" id="o-bs-sum-bug-ErrorPrefix" name="ErrorPrefix" value="" /> <label for="o-bs-sum-bug-ErrorNumber">Error Number</label> <input type="text" id="o-bs-sum-bug-ErrorNumber" name="ErrorNumber" value="" /> .... </fieldset> Using only CSS (or jquery), irrespective of the browser size, I want to pair label and input elements next to each other. I also do have freedom to

In NASM labels next to each other in memory are causing printing issues

十年热恋 提交于 2019-11-27 02:24:26
I am having an issue while programming in NASM. I am learning how to develop an OS purely in assembly and have started by creating a boot loader. My goal currently is to print "Hello, World!" and "Goodbye!" using the the BIOS interrupt 0x10. The issue I seem to be having occurs while printing values on the screen. Two labels appear to be next to each other in memory causing printing one string to print the contents of the other string. Why isn't hlen stopping the loop at the end of the first string? [org 0x7c00] mov ah, 0x0e mov bx, HELLO_MSG mov cx, hlen call print_string mov bx, GOODBYE_MSG

using labels in java without “loops”

强颜欢笑 提交于 2019-11-27 02:08:40
I always thought that the labels must be used only with loops but it seems not. Giving such code: public class LabelTest { public static void main(String[] args) { label1: System.out.println(""); label2: LabelTest t = new LabelTest(); } } When compiled line labeled "label1" compiles but the code at "label2" gives errors. Why's that? And why would I want to label statements which are not "loops"? You get an error because a label cannot be applied to variable declarations, that's just how the language grammar is defined (a label can only precede a Statement , and a

Automatic adjustment of margins in horizontal bar chart

不打扰是莪最后的温柔 提交于 2019-11-27 02:01:37
问题 I need to produce a series of horizontal grouped bar charts. The barplot function does not automatically adjust the margins of the plot, therefore the text gets cut off. graphics.off() # close graphics windows test <- matrix(c(55,65,30, 40,70,55,75,6,49,45,34,20), nrow =3 , ncol=4, byrow=TRUE, dimnames = list(c("Subgroup 1", "Subgroup 2", "Subgroup 3"), c( "Category 1 Long text", "Category 2 very Long text", "Category 3 short text", "Category 4 very short text" ))) barplot(test, las=2, beside

Adding greek character to axis title

人走茶凉 提交于 2019-11-27 00:54:55
I want to add a greek character to the y-axis of my barplot in R. The problem is that I need this character to be integrated in the title. I want to write: Diameter of aperture ("mu"m) in the axis label. With ylab=expression() I can write the greek character, with ylab="axis title" I can write the title with proper spaces between the words. But I can't find a way to put all these together and write a proper label with a greek word in the axis label. I hope I was clear enough. If you're using plotmath{grDevices} , the main help page ( plotmath ) contains an example of what you appear to want:

Suppress exponential formatting in figure ticks

丶灬走出姿态 提交于 2019-11-26 22:45:45
Tick labels for ticks bigger than about 10'000, get formatted to 1x10^4 for example. Whereas the exponential part appears above the corresponding axes. This misbehavior has been well described on on matlab central as well, but without a solution. Thanks for your help. The 'quick trick' set(gca, 'YTickLabel',get(gca,'YTick')) did not work when applied to bar3, as can be seen on the following figure. One way to get better control over tick labels, and to avoid the exponential formatting, is to use TICK2TEXT from the File Exchange. Here's an example: y = cool(7); %# define some data ah = axes; %#