axis-labels

Change the format of the axis tick labels in LiveCharts

旧巷老猫 提交于 2019-12-23 17:16:35
问题 I just can't find a solution for changing the format of the y-axis tick labels. Now I get labels like 0.03 and 0.035 . But I always need three digits behind the decimal point. The big question is, how to access the label format? This is my code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Forms; using System

Add (second) x axis to scatterplot to display group information

孤者浪人 提交于 2019-12-23 12:49:53
问题 I make a scatterplot using d3.js where the points are arranged by their name and an accompanying number. The data that is plotted would look like this: name, group, number "AB", "A", 0.5 "ABC", "A", 10.0 "BC", "B", 3.0 "BCD", "B", 5.0 "BCDE", "B", 0.3 "CD", "C", 1.6 "DE", "D", 1.5 What I want to achieve. What I want to achieve is a plot where the points are scattered on the x axis according to their name , but the x axis should display the group once per group and a tick between different

aligning the axes labels in 3d plot in matlab

ぃ、小莉子 提交于 2019-12-23 12:25:50
问题 I plot the mesh data with the following matlab commands [x, y] = meshgrid(-10:0.1:10, -10:0.1:10); z = exp(-x.^2 - y.^2); mesh(x, y, z); xlabel('time variable'); ylabel('space variable'); zlabel('wave'); You will see that no matter how to rotate the axes, the x and y label are always aligned horizontally. Is there any way to make it align with the x axis and y axis separately while I rotating the axes? 回答1: There has been a submission to align axes labels with the figure axis here. 回答2: You

Matplotlib parasite logarithmic axis ticks unwanted mirrorring

十年热恋 提交于 2019-12-23 12:09:30
问题 I'm trying to make a plot with two y-axes, one of them logarithmic and one linear, using host_subplot from mpl_toolkits.axes_grid1. The figure looks ok, with the exception of the minor ticks from the secondary y-axis (right) being also displayed on the primary y-axis (left), on the inside of the figure. import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import host_subplot import mpl_toolkits.axisartist as AA host = host_subplot(111) host.set_yticks(np.arange(-12, -3, 1.0)) par1 =

Coloring the axis tick text by multiple colors

↘锁芯ラ 提交于 2019-12-23 02:30:50
问题 I'm trying to plot a heatmap using R 's plotly package, where I'd like to have specific colors to specific labels of the y-axis tick text. Here's an example dataset: set.seed(1) df <- reshape2::melt(matrix(rnorm(100),10,10,dimnames = list(paste0("G",1:10),paste0("S",1:10)))) And here's what I'm trying: library(plotly) library(dplyr) plot_ly(z=c(df$value),x=df$Var2,y=df$Var1,colors=grDevices::colorRamp(c("darkblue","gray","darkred")),type="heatmap",colorbar=list(title="Scaled Value",len=0.4))

Include formatted subscript in mtext?

谁都会走 提交于 2019-12-22 08:57:25
问题 Admittedly I am new to R but I have looked around quite a bit and I can't seem to solve this. For superscript this works lovely mtext(expression(paste( italic("h") ^ italic("2"))), side=2, line = 2, cex=cexm) but when I try to get a subscript using the same approach mtext(expression(paste(italic("I") [] italic("a"))),side=2, line=2,cex=cexm) or mtext(expression(paste(italic("I"), italic(["a"]))),side=2, line=2,cex=cexm) plus several other variations on this theme R keeps telling me that there

How to prevent scales::percent from adding decimal

丶灬走出姿态 提交于 2019-12-22 05:40:38
问题 This started happening a few days ago, that scales::percent would add a decimal place in its labels, and I can't seem to disable this decimal to display integer values on y-axis. library(dplyr) library(ggplot2) mtcars %>% count(cyl) %>% mutate(prop = n / sum(n)) %>% ggplot(aes(x = cyl, y = prop)) + geom_point() + scale_y_continuous(labels = scales::percent) 回答1: Perhaps not a direct answer to your question, but I have used scales::percent_format and its accuracy argument ("Number to round to"

Show only time labels on xAxis. Highcharts

雨燕双飞 提交于 2019-12-22 04:33:16
问题 I need to display only time labels on xAxis. I'm using Highcharts and don't fully understand how to do it. On xAxis there should be time labels in format like 21:00. I do not need dates, only time is needed. In addition, the difference between two labels should be 00:30 (half an hour) or 01:30 and it should be zoomable. My PHP script writes some value in database every half an hour and I need to display it on a graph. Sorry for my poor English, I'm Russian. Any help would be appreciated :)

Google Chart Tools truncating y axis labels

折月煮酒 提交于 2019-12-22 01:40:36
问题 Working with a Google bar chart, here is what I got: Here my custom options var options = { width: 500, height: 240, legend : 'none', vAxis:{title:'Answers',textStyle:{color: '#005500',fontSize: '12', paddingRight: '100',marginRight: '100'}}, hAxis: { title: 'Percentage', textStyle: { color: '#005500', fontSize: '12', paddingRight: '100', marginRight: '100'} } }; Can't I set a width for these <g> / <rect> tags? 回答1: I believe the chartArea.left option is what you are looking for. Try

d3.js axis labels - color not changing

◇◆丶佛笑我妖孽 提交于 2019-12-22 01:24:39
问题 I'm creating my axis with the following text, however the color of the labels is not changing properly; the color the text remains black. Does anybody know why? // create Axis svg.selectAll(".axis") .data(d3.range(angle.domain()[1])) .enter().append("g") .attr("class", "axis") .attr("transform", function(d) { return "rotate(" + angle(d) * 180 / Math.PI + ")"; }) .call(d3.svg.axis() .scale(radius.copy().range([-5, -outerRadius])) .ticks(5) .orient("left")) .append("text") .attr("y", function