annotate

How to add an asterisk symbol in a mathematical expression?

北城余情 提交于 2019-12-03 06:52:38
I'm trying to annotate a plot with R² value and significance coding, but I can't pass * as a symbol and not as the juxtaposition operator. I've tried ?plot.math , here is what I tried plot(1:10,1:10) text(6,4,expression(R^2==8)) text(6,4,expression(R^2==8^{**})) Error: unexpected '^' in "text(6,4,expression(R^2==8^{**" You need to use paste inside your expression: text(4,6,expression(paste(R^2==8^"**"))) or text(6,4,expression(paste(R^2==8, "**"))) 来源: https://stackoverflow.com/questions/14871706/how-to-add-an-asterisk-symbol-in-a-mathematical-expression

How to left align text in annotate from ggplot2

故事扮演 提交于 2019-12-03 02:31:17
问题 My example is: qplot(mtcars$mpg) + annotate(geom = "text", x = 30, y = 3, label = "Some text\nSome more text") How do I get the text here to be left aligned? So that the 'Some's line up with each other. 回答1: hjust = 0 does what you want. hjust stands for horizontal justification , 0 will be left-justified, 0.5 will be centered, and 1 will be right-justified. qplot(mtcars$mpg) + annotate(geom = "text", x = 30, y = 3, label = "Some text\nSome more text", hjust = 0) See also vjust for vertical

Rails Annotate Segmentation Fault

感情迁移 提交于 2019-12-02 17:23:16
问题 There are a handful of questions that sort of skirt around this question, but nothing that really gets to what I'm looking for. After I bundle install my Gemfile, listed below, I run annotate and come up with the following error: /Users/nickcoelius/.rvm/gems/ruby-1.8.7-p334@nick/gems/sqlite3-ruby-1.3.2/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10] Abort trap I'm running ruby 1.8.7, rails 3.0.7, and Mac OS 10.6.7. Thoughts?

How to left align text in annotate from ggplot2

房东的猫 提交于 2019-12-02 16:03:46
My example is: qplot(mtcars$mpg) + annotate(geom = "text", x = 30, y = 3, label = "Some text\nSome more text") How do I get the text here to be left aligned? So that the 'Some's line up with each other. hjust = 0 does what you want. hjust stands for horizontal justification , 0 will be left-justified, 0.5 will be centered, and 1 will be right-justified. qplot(mtcars$mpg) + annotate(geom = "text", x = 30, y = 3, label = "Some text\nSome more text", hjust = 0) See also vjust for vertical justification. In ggplot2 , these arguments are present any time text preferences are set. They work for

ClearCase SCM Adapter support for annotate

二次信任 提交于 2019-12-01 12:54:34
I wanted to annotate some code with version history. This is easy in Eclipse when using SVN, but the Rational ClearCase SCM Adapter plugin doesn't appear to support it. I quick Google search reveals that on the command line ClearCase supports annotate via: cleartool annotate -out - -fmt "%Vn |" -rm -nheader util.c I also found a number of non-free plugins that support annotate. Any free alternatives? VonC The cleartool annotate is the only form of annotation (or "blame") for ClearCase, and isn't available through the official plugins (ClearCase SCM adapter, or the CCRC plugin) That is why you

Annotate points in Seaborn stripplot with Pandas dataframe

女生的网名这么多〃 提交于 2019-12-01 11:57:37
问题 Is it possible to annotate each point on a stripplot in seaborn? My data is in the pandas dataframe. I realize that annotate works for matplotlib but I have not found it to work in this case. 回答1: You just need to return the axes object. The example below is adapted from the seaborn docs here: import seaborn as sns sns.set_style("whitegrid") tips = sns.load_dataset("tips") sat_mean = tips.loc[tips['day'] == 'Sat']['total_bill'].mean() ax = sns.stripplot(x="day", y="total_bill", data=tips) ax

Annotate points in Seaborn stripplot with Pandas dataframe

五迷三道 提交于 2019-12-01 11:41:49
Is it possible to annotate each point on a stripplot in seaborn? My data is in the pandas dataframe. I realize that annotate works for matplotlib but I have not found it to work in this case. You just need to return the axes object. The example below is adapted from the seaborn docs here : import seaborn as sns sns.set_style("whitegrid") tips = sns.load_dataset("tips") sat_mean = tips.loc[tips['day'] == 'Sat']['total_bill'].mean() ax = sns.stripplot(x="day", y="total_bill", data=tips) ax.annotate("Saturday\nMean", xy=(2, sat_mean), xycoords='data', xytext=(.5, .5), textcoords='axes fraction',

Insert custom annotation in java 'field' using annotate plugin + JAXB (upon xsd -> java)

佐手、 提交于 2019-11-30 18:55:22
Use case: Wanna insert custom annotation to fields in java class generated by JAXB Problem: Using Annotate plugin + JAXB [1], am able to successfully insert custom annotations but they are getting inserted at getter method rather than field. Morphia (mongo DB) annotations (that i actually want to insert) however can annotate only java fields [2]. My test xsd: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1" xmlns:annox="http://annox.dev.java.net" jaxb:extensionBindingPrefixes="annox"> <xsd:element name="hoo" type="External

Add textbox to facet wrapped layout in ggplot2

蹲街弑〆低调 提交于 2019-11-30 09:09:08
I am aware that one is able to annotate a plot created by ggplot2 or even to combine large and small viewports, as is documented in the ggplot2-book. However, it seems that these only work in the actual plot-areas and not in the "final plot". For example I have a plot like this: Here we see ten panels showing a linear regression smoother applied to a binomial dataset, but that´s not the point. Now I want a summary (stored in a dataframe) in form of a text in the lower right of the plot, such as this... I did not find any example that comes even close. Any hints, helps or comments are much

Matplotlib: Add strings as custom x-ticks but also keep existing (numeric) tick labels? Alternatives to matplotlib.pyplot.annotate?

£可爱£侵袭症+ 提交于 2019-11-30 08:16:53
I am trying to produce a graph and I am having some issues annotating it. My graph has a log scale on the x-axis, showing time. What I want to be able to do is keep the existing (but not predictable) numeric tick labels at 100 units, 1000 units, 10000 units, etc but also add custom tick labels to the x-axis that make it clear where more "human readable" time intervals occur---for instance I want to be able to label 'one week', 'one month', '6 months', etc. I can use matplotlib.pyplot.annotate() to mark the points but it doesn't really do what I want. I don't really want text and arrows on top