axis-labels

How to auto adjust R figure axis labels to matrix size?

北城余情 提交于 2019-12-06 08:47:48
I want to make the fontsize of the y-axis labels adjustable to the input data size on the y-axis like in Fig. 3, in contrast to the current situation in Fig. 1-2 where labels are not next to the corresponding lines. Code library("corrgram") # https://stackoverflow.com/a/40387233/54964 ids <- seq(1,18) x_at <- seq(0.075, 0.925, length.out = length(ids)) y_at <- seq(0.075, 0.91, length.out = length(ids)) createLabels <- function(xlab, ylab, x_labels, y_labels){ ids <- y_labels # assume here x_at <- seq(0.075, 0.925, length.out = length(ids)) y_at <- seq(0.075, 0.91, length.out = length(ids))

jqplot - superscript in axis label

只谈情不闲聊 提交于 2019-12-06 08:07:05
问题 As the title says how do I add superscript fonts to the axis labels in a jqplot graph? I tried using Javascript sup() function and also actual html tags for the titles of the axes but to no vain. Basically I need to display units like m 3 etc. Do I have to tinker with the AxisLabelRenderer or is there any obvious workaround I am missing? Thanks. 回答1: You can use unicode characters for do that; "Superscript two"(\u00B2) (2) "Superscript three" (\u00B3) (³) "Superscript one" (\00B9) (¹) try

Matplotlib - Different tick label alignment along the same axis

蓝咒 提交于 2019-12-06 06:21:58
I have a figure with a lot of subplot, such that the last ticklabel of an axis is written over the first tick label of the next one. See example here As I want to keep the spacing between the subplots as I set it, I would like to have a different alignment depending on the tick, as it could be produced by : plt.xticks([0], ha = 'left') plt.xticks([0.2,0.4], ha = 'center') plt.xticks([0.6], ha = 'right') Using that, only the last call of xticks is shown on the figure. In another way, the idea is to align first and last tick labels such that they stay within the subplot. Hope I'm clear ! Any

graph axis calibration in c++

混江龙づ霸主 提交于 2019-12-06 05:46:30
I am plotting some float data in a 2D graph and I need to calibrate the axis of graph into small units that looks neat. Obviously this unit varies based on magnitude of the data. I am trying to find out a good way to divide the axis into nice looking number. for example if my data runs from -1.3345 to +5.882 may be divide in units of 1.0 or 0.5. if my data us from -100 to 800 divide the axes into units of 100 or 50. (I hope that makes sense) right now I am dividing the range (largest value - lowest value) by some fixed integer and getting the units but that gives me ugly looking number with

ASP.NET Chart control set month names from int value on X Axis labels

大憨熊 提交于 2019-12-06 03:24:00
I want to replace numbers (1, 2, 3, ...) on the X Axis of the chart with the corresponding month name. This is my actual chart: On the DataView that populates the Series I have the "MONTH" column that contains values from 1 to 12. I also had to manually set the Minimum and Maximum value to 0 and 13, otherwise I lose the first and last column because of a lack of space between the beginning of the first X Axis column and the Y Axis and between the last X Axis column end of Chart area. <ChartAreas> <asp:ChartArea Name="ChartArea1"> <AxisX IsStartedFromZero="True" Title="Mese" TitleFont="Segoe UI

How to add axis labels for row chart using dc.js or d3.js

假如想象 提交于 2019-12-06 02:36:33
问题 For Bar Chart and Stacked Chart, we can use .xAxisLabel("X Axis Label") and .yAxisLabel("Y Axis Label") functions to add labels for respective axis. But, Is there any way to add axis labels for Row Chart? 回答1: Try something like this: dc.renderAll(); function AddXAxis(chartToUpdate, displayText) { chartToUpdate.svg() .append("text") .attr("class", "x-axis-label") .attr("text-anchor", "middle") .attr("x", chartToUpdate.width()/2) .attr("y", chartToUpdate.height()-3.5) .text(displayText); }

How to show every second R ggplot2 x-axis label value?

被刻印的时光 ゝ 提交于 2019-12-06 00:46:41
问题 I want to show every second of x-axis label list in the presentation. Simplified code example in the following and its output in Fig. 1 where four Dates shown but #2 and #4 should be skipped. # https://stackoverflow.com/a/6638722/54964 require(ggplot2) my.dates = as.Date(c("2011-07-22","2011-07-23", "2011-07-24","2011-07-28","2011-07-29")) my.vals = c(5,6,8,7,3) my.data <- data.frame(date =my.dates, vals = my.vals) plot(my.dates, my.vals) p <- ggplot(data = my.data, aes(date,vals))+ geom_line

Custom y-axis scale and secondary y-axis labels in ggplot2 3.1.0

Deadly 提交于 2019-12-05 15:06:27
问题 Edit 2 The current developmental version of the ggplot2-package does solve the bug mentioned in my question below. Install the dev version using devtools::install_github("tidyverse/ggplot2") Edit It seems as the faulty behaviour of sec_axis in ggplot2 3.1.0 is a bug. This has been recognized by the devs and they are working on a fix (see thread on GitHub). Goal I have a graphic where the y-axis ranges from 0 to 1. I'd like to add a secondary y-axis that ranges from 0 to 0.5 (so exactly half

gnuplot: fill area curve keeping tics on top

允我心安 提交于 2019-12-05 12:15:32
in gnuplot, when you try to fill an area under a curve, the tics of both axes are hinded behind the solid area. Is there any way to give them to the front? I am using postcript terminal, where no transparent features are allowed (i guess) Thanks There sure is! Before plotting, run this interactively or in a script: set tics front Try help tics interactively for more info. user3207862 After trying many options I realized that the following works properly: set tics front It seems important to write it before the plot command. ;-) 来源: https://stackoverflow.com/questions/21193547/gnuplot-fill-area

Changing axis options for Polar Plots in Matplotlib/Python

*爱你&永不变心* 提交于 2019-12-05 09:14:16
I have a problem changing my axis labels in Matplotlib. I want to change the radial axis options in my Polar Plot. Basically, I'm computing the distortion of a cylinder, which is nothing but how much the radius deviates from the original (perfectly circular) cylinder. Some of the distortion values are negative, while some are positive due to tensile and compressive forces. I'm looking for a way to represent this in cylindrical coordinates graphically, so I thought that a polar plot was my best bet. Excel gives me a 'radar chart' option which is flexible enough to let me specify minimum and